Ok, check http://tomee.apache.org/clients.html
Le 10 oct. 2013 23:47, "nesrine" <[email protected]> a écrit :

> I didn't undrestand my client bean  is like
> String jndiName = "java:global/Teste/SimpleBean";
>                 Context context ;
>                 Properties properties = new Properties();
>
>
> properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"
>                 );
>
>
> properties.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
>
> properties.put("java.naming.provider.url","localhost:1099");
>
>                 try
>                 {
>                  context = new InitialContext(properties);
>                 System.out.println("Looking up JNDI Name " + jndiName);
>                 Object object = context.lookup(jndiName);
>                 System.out.println("Lookup returned " + object);
>
>                 SimpleRemote remote = (SimpleRemote) object;
>                 System.out.println(remote.getMessage());
>                 }
>                 catch(Exception e)
>
>                 {
>                 e.printStackTrace();
>                 }
>
>
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Error-EJB-sample-tp4665536p4665539.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Reply via email to