Hi, You can use the static final variable without problems in an EJB. However if you use static variables which are not final then if you deploy your EJB in more than one application server the static variable may not be consistentent over the servers. If this is not a requirement then its ok I guess. The ejb specification in fact contains a sample with static final variables
Hi Please also note this section from the ejb spec
24.1.2 Programming restrictions This section describes the programming restrictions that a Bean Provider must follow to ensure that the enterprise bean is portable and can be deployed in any compliant EJB 2.0 Container. The restrictions apply to the implementation of the business methods. Section 24.2, which describes the Container’s view of these restrictions, defines the programming environment that all EJB Containers must provide. • An enterprise Bean must not use read/write static fields. Using read-only static fields is allowed. Therefore, it is recommended that all static fields in the enterprise bean class be declared as final.
Slime does not pay. Always keep your tiny ad dry.
a bit of art, as a gift, the permaculture playing cards