Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes EJB Runtime Configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB Runtime Configuration" Watch "EJB Runtime Configuration" New topic
Author

EJB Runtime Configuration

Dan Fow
Greenhorn

Joined: Apr 06, 2011
Posts: 4
I'm a newbie to JEE and I'm using an EJB to start a bean that calls a URL, I need some way of configuring that url at runtime.

If I was using spring I would just make the URL a constructor argument and initialize the bean in xml. However, I am using JEE.

Can someone tell me the proper way to make a bean have a configurable value in JEE 6?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You could read the value from somewhere.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
amit punekar
Ranch Hand

Joined: May 14, 2004
Posts: 512
Hi,
You can use environment entries.
They can be declared using <env-entry> element in ejb-jar.xml.

With EJB 3.0 you can inject them in the bean as you do in the Spring.



regds,
Amit

 
wood burning stoves
 
subject: EJB Runtime Configuration