EJB Section Index | Page 7
Recovering State of Statefull SessionBean. I know how to get the EJBHandle of a Statefull SessionBean and write it to a file and I get a reference to the EJBObject after I read it back. Now the que...more
In EJB 1.1., how do I ensure that while any client can access EJB A, only EJB A should be allowed to access EJB B? ie my client cannot access EJB B directly.
(Keeping in mind that 1.1 version does not support run_as_mode) Hi, Maybe this it's just a silly idea, but can't you just limit the access to EJB B inside the deployment descriptor, using the <...more
I f I have to write EJBs, can I first write JavaBeans and later convert them to EJBs? Yes, you can convert them later, but keep in mind that Java Beans are client-side objects and EJBs are server...more
Omar, In few words, "marshalling" refers to the process of converting the data or the objects inbto a byte-stream, and "unmarshalling" is the reverse process of converting the byte-stream beack to...more
No. A work-around would be to put <env-entry> in the deployment descriptor and the EJB could then read the environment variable.
Can stateful behave as stateless Is it possible to change a Stateful Session Bean to behave in a Stateless manner at deploy-time? What issues are involved?
Stateful and Stateless Session Beans are for different purposes. Therefore, stateful session bean cannot act as a Stateless Session Bean since their lifecycles are different. You can create a Stat...more
You cannot change the primary key field of an Entity bean. Refer to page 130 of the EJB 2.0 specification, it states "Once the primary key for an entity bean has been set, the Bean Provider must ...more
When using Websphere 3.5, VisualAge and Oracle to develop CMP EJB's I receive the following error: "Unable to insert data into a NOT NULL field". What am I doing wrong?
You need to modify the create method for the Entity bean to initialize ALL the not null fields. VAJ defaults to initializing the primary key but it doesn't initialize the NOT NULL fields, this w...more
Web Services can be thought of as a wrapper that can be used to allow EJB's to invoke external services and also to allow external services and clients to invoke the EJB's. A major strength of Web...more
A select method is similar to a finder method for Entity Beans, they both use EJB-QL to define the semantics of the method. They differ in that an ejbSelect method(s) are not exposed to the client...more
ECperf is used for benchmarking J2EE application servers. It consists of a Specification and a benchmarking kit which is designed specifically to test and measure performance and scalability of J...more
Check out section E.12 of Public Final Draft 2 for a complete listing of the changes between versions. The major changes were the addition of Local interfaces and Local Home interfaces for both E...more
In EJB 2.0 Entity Beans, What is the difference between the local home interface and the remote home interface?
EJB 2.0 adds the notion of local beans, which are accessible only from within the JVM your beans are running in. The idea behind this is that many beans you might create are never meant to be a...more
In EJB 2.0, An Entity Bean can have a set of Local interfaces for use by clients within the same JVM (known as collocated clients). The local interfaces extend the following interfaces: javax.ejb...more
No, not really. If your appserver uses JRMP, then it *might* mean that your serverside objects (EJB's) get garbage collected sooner. However, it depends on the appserver's lifecycle management. S...more