geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: JNDI lookup fails after Geronimo restarted
Date Fri, 30 Jan 2009 21:29:01 GMT
Hi Jazon,

What version of Geronimo are you using and can you post the stacktrace?

-David

On Jan 30, 2009, at 7:11 AM, Jazon wrote:

> Hello,
> I have the following test program, which runs fine to lookup a  
> remote stateless session bean.
> But the problem is when my program is running, I restart Geronimo,  
> the JNDI lookup will always fail even after Geronimo is fully  
> restarted.
> I am not sure it is a problem of Geronimo or Openejb.
> Anyone knows how to solve this or work around it?
> Thanks
>
> public class testRemote {
>
>     public static void testEjb()throws Exception{
>         Properties p = new Properties();
>         p.setProperty("java.naming.factory.initial",  
> "org.apache.openejb.client.RemoteInitialContextFactory");
>         p.setProperty("java.naming.provider.url", "ejbd://localhost: 
> 4201");
>         p.setProperty("java.naming.security.principal", "system");
>         p.setProperty("java.naming.security.credentials", "manager");
>         p.setProperty("openejb.authentication.realmName", "geronimo- 
> admin");
>         InitialContext context = new InitialContext(p);
>
>         MyService service = (MyService)  
> context.lookup("MyServiceImplRemote");
>         Object o = service.getAllCustomers();
>         System.out.println(o);
>     }
>
>     public static void main(String[] args) throws Exception{
>         while (true){
>             try{
>                 testEjb();
>
>             }catch(Exception e){
>                 e.printStackTrace();
>             }
>             Thread.sleep(5000);
>         }
>     }


Mime
View raw message