Help coderanch get a
new server
by contributing to the fundraiser
  • 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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: 28056
198
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic