EJB
Must EJBs be homogeneously deployed across a cluster? Why?
Nov 27th
Yes. In WebLogic Server 6.0 and later, EJBs must be homogeneously deployed across a cluster for the following reasons: ? To keep clustering EJBs simple ? To improve performance by avoiding cross-server calls. If EJBs are not deployed on all servers, cross-server calls are more likely. ? To ensure that every EJB is available locall.y ? To ensure that all classes are loaded in an undeployable way. Every server must have access to each EJB’s classes so that it can be bound into the local JNDI tree. If only a subset of the servers deploys the bean, the other servers More >
How should I set max-beans-in-free-pool for stateless beans?
Nov 27th
This is explained in “Pooling for Stateless Session EJBs” in Programming WebLogic Enterprise JavaBeans.
How should I set initial-beans-in-free-pool for stateless beans?
Nov 27th
This is explained in “Pooling for Stateless Session EJBs” in Programming WebLogic Enterprise JavaBeans.
When are stateless EJBs passivated?
Nov 27th
Stateless ejbs are never passivated. Since stateless ejbs do not have state, there is no need to passivate them. They are put back into the free pool after each method call so they will be available to service other requests.
Can I call remove() on a stateless session bean?
Nov 27th
Yes. Currently, calling remove() on a stateless session bean is a noop.
When are ejbCreate and ejbRemove called on stateless EJBs?
Nov 27th
When the stateless beans are created and removed by the EJB container. Note that this does not correspond to calls to create and remove on the stateless home. Depending on your initial-beans-in-free-pool setting, beans may be created by the container during deployment at which point they are placed in the free pool. Aside from during deployment, beans will only be created to service requests when all of the beans in the free pool are in use and themax-beans-in-free-pool limit has not been met. Stateless beans are removed by the EJB container during undeployment.
Why did I get a LockTimedOutException?
Nov 27th
When you get a LockTimedOutException while invoking a stateful session EJB, one of two things has occurred:
z You have <allow-concurrent-calls> set to true in your weblogic-ejb-jar.xmldescriptor and your call timed out while waiting to be processed. The timeout used in this case is the value <trans-timeout-seconds> element of the weblogic-ejb-jar.xml descriptor or its default value of 30 seconds.
z You do not have <allow-concurrent-calls> set to true and you attempt to invoke a stateful session bean that is already busy processing another request. In this case, the second method call will not block and a LockTimedOutException will be thrownimmediately.
More >Can you explain passivation / activation?
Nov 27th
Passivation and activation are a standard part of a stateful session bean’s lifecycle. For details, see Stateful Session EJB Life Cycle in Programming WebLogic Enterprise JavaBeans.
Can an entity bean be a listener for JMS messages?
Nov 27th
No. Message driven beans should be used to consume JMS messages.
