EJB Section Index | Page 25
Client applications or beans can access meta data about a bean from its EJBMetaData object. The EJBMetaData object is obtained from the bean's EJB home reference using the EJBHome.getEJBMetaData(...more
An enterprise bean is composed of many parts, not just a single class. Essentially, an enterprise bean is constructed with a bean class, remote interface, home interface and deployment descriptor...more
Enterprise beans are software components that run in a special environment called an EJB container. The container hosts and manages an enterprise bean in the same manner that a Java WebServer hos...more
Using java.io is prohibited Using the java.io package from within a bean is prohibited. The EJB 1.1 Specification, section 18.1.2 (Programming Restrictions) states the following: An enterpris...more
In short, they don't. The EJB 1.1 Specification, section 18.1.2 (Programming Restrictions) lists some things that enterprise beans cannot do. In particular: The enterprise bean must not attemp...more
The servers involved in handling and processing a user's request break down into a few basic types, each of which may have one or more tasks it solves. This flexibility gives developers a great d...more
The following is a code snippet that demonstrates how a JSP page can interact with an EJB session bean: <%@ page import="javax.naming.*, javax.rmi.PortableRemoteObject, foo.AccountHome, foo.Ac...more
Depends on what you mean by "persisted". Data that is part of a transaction like database rows are persisted depending on the success of the transaction. If the transaction manager dete...more
CMP in beans depends a lot on the EJB vendor implementation and utilities. With some implementations container-managed entity beans can only by mapped to one table, while other implemenations of...more
Note: This question was answered by the vendor. [One possible solution is J-Integra] The J-Integra pure Java-COM bridge can be used to access EJBs running in any Application Server, in any JVM o...more
While EJB 1.1 provides the JNDI ENC for managing standard resources like URL, JDBC, JavaMail and JMS, connections to other types of resources are not addressed by EJB 1.0 or EJB 1.1, but there are...more
You must set transaction-type in the deployment descriptor.
How do you configure the transaction characteristics for a session bean with container-managed transactions?
You must set trans-attribute in the deployment descriptor.
It doesn't. Entity beans do not employ JTA transactions; that is, entity beans always employ declarative, container-managed transaction demarcation. Entity beans, by definition, are somewhat tig...more
Yes, but with restrictions. By definition, a stateless session bean has no state; hence, each method invocation must be independent. (The bean can be "swapped out" between method invoc...more