Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Passing runtime parameters to EJB

 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We use properties files
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to pass runtime properties for a servlet.
Regards,
Raman.
 
Saloon Keeper
Posts: 25608
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic