• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Environment properties

 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using JBoss to write a stateless session bean that uses environment properties. When I run the client program, I am getting:
Here is an excerpt from ejb-jar.xml:

and here is where I try to use it in the client code:

I am trying to get through a chapter in "Mastering Enterprise Java Beans" that makes extensive use of the now deprecated System.getProperties, so if anyone knows another good way to do this, let me know!
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you loaded the environment properties into
the context?
Have you downloaded Mastering EJB 2.0 from
www.theserverside.com?
 
John Fontana
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Have you downloaded Mastering EJB 2.0 from
www.theserverside.com?


I did...I was starting to get the feeling that some things had changed when I saw everywhere that getProperties has been deprecated since EJB1.1. Ugghh. I went out and spent 49.99 USD on the first edition, and too much of the code in it does not run in any of the containers I can get a hold of. Wonder if Wiley will send me the replacement?
I have gotten the example to run when I call the jndi name in the ejb itself, but I still get the same error in the client. Now I've looked back and that's what the example in the book calls for, but I imagine it would be useful to call properties from the client as well...or am I totally wrong?
[ May 29, 2002: Message edited by: John Fontana ]
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
System properties by themselves are not going to
do it unless you've added some. I
believe the method for getting the initial
context is container specific. You need to
consult the JBoss documentation for the right
method.
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic