File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing runtime parameters to EJB

 
Douglas Kent
Ranch Hand
Posts: 171
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I need to pass some parameters to my stateless session EJB (mail server info) at creation. Have looked in the associated deployment descriptors (ejb-jar.xml, etc) and see that there is no extensibility there. Anyone have any ideas about how to do this?
 
Steve Chernyak
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We use properties files
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
you can use from the ejb-jar.xml dd:

then from your implementation:

regards.
[ June 14, 2002: Message edited by: Marcos Maia ]
 
seshu kumar
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One Problem with setting these in the descriptor as env entries is, that it might be necessary to redeploy the app in the appserver(for changes).
(Unless of course the Appserver allows you to edit the descriptor while the App is running.
I worked on iPlanet and it requires a redeploy.
I think weblogic allows you to edit descriptors through admin console.Correct me If I'm wrong!
)
Properties file seems to be more easier to manage.
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by seshu kumar:
One Problem with setting these in the descriptor as env entries is, that it might be necessary to redeploy the app in the appserver(for changes).
(Unless of course the Appserver allows you to edit the descriptor while the App is running.
I worked on iPlanet and it requires a redeploy.
I think weblogic allows you to edit descriptors through admin console.Correct me If I'm wrong!
)
Properties file seems to be more easier to manage.


Hi,
Yes, you�re wrigth about WebLogic 6x, you can edit the dd through the admin console.
 
Malli Raman
Ranch Hand
Posts: 312
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to pass runtime properties for a servlet.
Regards,
Raman.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17645
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Malli Subramanian Raman:
[QB]Is it possible to pass runtime properties for a servlet.

If it wasn't, Struts wouldn't work.
Both properties files and the web.xml file are available, in addition to the runtime environmental sources such as JNDI.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic