November 11, 2003

On "constants" in interfaces

In Incipient(thoughts) - Laurent Bossavit's weblog, Laurent talks about (lack of?) uses for "constants" in interfaces.

One use I've seen of this is to define "constants" related to EJB implementations. Some were defined on the home interface, others on the remote interface.

In particular, this project didn't use J2EE's recommendentions of naming EJBs, declaring them with ejb-ref and looking them up in the JNDI tree, so there was a big property file with all the objects and their interfaces. The key to each line in the file was a name for the class such as "accountBO". Everytime we need the EJB, we would call getEJBLocalHome(AccountBO.ENTITY_KEY) where AccountBO was an interface.

Posted by pgirolami76 at November 11, 2003 11:00 AM | TrackBack
Comments
Post a comment









Remember personal info?