# of used / pooled instances of CMP / BMPs
1 posts in topic
Flat View  Flat View

Posted By:   CEN03_MS
Posted On:   Monday, March 3, 2003 11:22 PM

I use Orion Appserver. Some of the BMP deployments
go beyond the max-instances specified in the deployment
descriptor of the bean. Iam trying to explore the various
reason for this, if any of these ejb references are being
cached. One of the beans has a set of final static strings and ints defined in the bean class. I am just wondering if
this has any effect on the abnormal increase in the # of beans.

Is it a good practice to define final static strings and ints inside the Entity beans?

Re: # of used / pooled instances of CMP / BMPs

Posted By:   Nick_Maiorano  
Posted On:   Tuesday, March 4, 2003 07:10 PM


There is nothing wrong with defining static final variables inside entity beans. I doubt that this has anything to do with the problem you are experiencing.

The source of confusion some people may have about static variables inside EJBs is that you need to be careful when static variables are not final. This is because you don't always know how many classloaders have been used by the app server. Thus, assigning a value to a static non final variable in one classloader will not affect the other classloader for the same class. This can cause problems.

About | Sitemap | Contact