geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janko Heilgeist <janko.heilge...@rzg.mpg.de>
Subject Re: cannot find serverinfo jndi lookup
Date Sat, 12 Apr 2008 09:35:03 GMT
Hi Marco,

the line "<ref-name>system-info</ref-name>" defines the local name of 
the ServerInfo object in the context of your WAR. Therefore, you can either

1) keep the ref-name and try to lookup "java:comp/env/system-info", or

2) keep the lookup and change the line in geronimo-web.xml to 
<ref-name>ServerInfo</ref-name>.

I hope I could help you!

Regards, Janko


MarcoLaponder wrote:
> I am trying to get some information for the ServerInfo object, i have added
> the gbean to my geronimo-web.xml:
> 
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
> 	<context-root>/navi</context-root>
>     <gbean-ref> 
>        <ref-name>system-info</ref-name> 
>        <ref-type>org.apache.geronimo.system.serverinfo.ServerInfo</ref-type>

>        <pattern> 
>          <name>ServerInfo</name> 
>        </pattern> 
>      </gbean-ref> 
>  </web-app>
> 
> and a try to get a handle of the serverinfo in my servlet by:
> 
> serverInfo = (ServerInfo)(new
> InitialContext().lookup("java:comp/env/ServerInfo"));
> 
> but this throws a NameNotFoundException.
> 
> What am I doing wrong in the situation above ? 
> 
> Kind regards,
> Marco Laponder


Mime
View raw message