Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

J2EE Application Configuration  RSS feed

Ron Eisele
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, all. First post here after lurking for a while, and I've ran into a problem. Well, confusion at the very least...
I'm just getting started with the intricate nature of the whole ejb development/deployment process, so I hope the answer to this isn't *too* obvious. I'm developing some entity and session beans just to try them out. In one instance, I have a session bean that requires the use of a database connection. So far I've been hardcoding the JNDI name of the datasource within the source code, so I began looking for a way around that (i.e. specify it at deployment time). I found one way, and that's to set up an environment entry (<env-entry>) for the bean itself in the deployment descriptor. That's fine, but I do have a problem with this: in our (loosely defined design) at this point, we will want to have a *group* of session EJBs use the same JNDI-named datasource. How does one go about setting an *application wide* configuration setting and then access that from the bean? Every discussion I see of the env-entry of the DD has it under each we have to duplicate this setting across every bean we develop?
Any help appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!