Meaningless Drivel is fun!*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes [SCBCD 1.3] env-entry lookup problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "[SCBCD 1.3] env-entry lookup problem" Watch "[SCBCD 1.3] env-entry lookup problem" New topic
Author

[SCBCD 1.3] env-entry lookup problem

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

In my client :


In my DD :


The error I get, using Jonas application server:


Maybe it has something to do with the application server that i am using.
Any idea ? Thanks a lot


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

In my client

What do you mean by your client ? You've defined an environment entry for a bean, right ? Are you trying to access that entry from a client, or from the bean owning the entry ?


[My Blog]
All roads lead to JavaRanch
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Hi,
Thanks for helping.
I am indeed trying to get the environment variable from the client layer.
I know this env. variable has been defined in the deployment descriptor for a specific entity bean,
but it should also be possible to access it from my client class, not just my entity bean.
If not, please tell me why it would not be possible.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

No, it's not accessible. An environment entry is scoped to the enterprise bean whose declaration contains the env-entry element. This means that the environment entry is inaccessible from other enterprise beans at runtime. Neither from a client.
 
jQuery in Action, 2nd edition
 
subject: [SCBCD 1.3] env-entry lookup problem
 
Similar Threads
env-entry tag
Possible to set an env-entry to null in my web.xml file?
value for Context.PROVIDER_URL
getInitParameter with a MessageDrivenBean
Issue w/ accesing file from a Servlet