Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Environment properties  RSS feed

 
John Fontana
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • 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!
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!