uhmmm why are you getting the home again? you already have the home.....
----- Original Message -----
From: Boris Garbuzov <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 2:42 PM
Subject: [JBoss-user] getEJBHome(): NoInitialContextException
> I am just playing with EJB API in JBoss. I successfully created an entity
bean and
> ran its business methods, but can not get home. Can you give me any
suggestions?
>
> -------------client console---------------------
> java.lang.reflect.UndeclaredThrowableException:
> javax.naming.NoInitialContextException: Need to specify class name in
environment
> or system property, or as an applet parameter, or in an application
resource file:
> java.naming.factory.initial
> at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:646)
>
> ------------client code----------------
> Properties env = new Properties();
> env.setProperty("java.naming.factory.initial",
> "org.jnp.interfaces.NamingContextFactory");
> env.setProperty("java.naming.provider.url", "localhost:1099");
> env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
> Context jndiContext = new InitialContext (env);
> String location = "cartEjb/OrderEntity";
> Object boundObject = jndiContext.lookup (location);
> OrderHome home = (OrderHome) PortableRemoteObject.narrow (boundObject,
> OrderHome.class);
> OrderRemote orderRemote = home.create (sessionId, customerName,
cartRemote);
> ... // business methods run fine
> EJBHome gotHome = orderRemote.getEJBHome(); // here it fails
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user