You should use new InitialContext(); when access java:comp/env

Regards,
Adrian


On Wed, 2003-08-20 at 14:23, Jiri Chaloupka wrote:
> Hallo,
> I am learning about ejbs ...
> I have some ejb deployed on JBoss and client for this, where is:
> 
> ************************************************
> Properties props = System.getProperties();
> props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
>                 "org.jboss.naming.HttpNamingContextFactory");
> props.setProperty(Context.PROVIDER_URL,
>                 "http://localhost/invoker/ReadOnlyJNDIFactory";);
>         
> InitialContext iniCtx = new InitialContext(props);
> Context ejbCtx = (Context)iniCtx.lookup("java:comp/env/ejb");
> ...
> ************************************************
> 
> and at console I see:
> *********************************************************
> java.lang.reflect.UndeclaredThrowableException
>         at $Proxy0.lookup(Unknown Source)
>         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
> ...
> *********************************************************
> 
> Where I can see corrent source name instead of java:comp/env/ejb, which 
> I saw in Joss book?
> Durring ejb deploying there was no name displayed:
> *********************************************************
> 10:02:07,109 INFO  [MainDeployer] Starting deployment of package: 
> file:/D:/jboss
> /server/default/deploy/counter.jar
> 10:02:07,484 INFO  [EjbModule] Creating
> 10:02:07,484 INFO  [EjbModule] Deploying Count
> 10:02:07,609 INFO  [StatefulSessionContainer] Creating
> 10:02:07,625 INFO  [StatefulSessionInstancePool] Creating
> 10:02:07,625 INFO  [StatefulSessionInstancePool] Created
> 10:02:07,625 INFO  [StatefulSessionFilePersistenceManager] Creating
> 10:02:07,687 INFO  [StatefulSessionFilePersistenceManager] Created
> 10:02:07,687 INFO  [StatefulSessionContainer] Created
> 10:02:07,687 INFO  [EjbModule] Created
> 10:02:07,687 INFO  [EjbModule] Starting
> 10:02:07,687 INFO  [StatefulSessionContainer] Starting
> 10:02:07,750 INFO  [StatefulSessionInstancePool] Starting
> 10:02:07,750 INFO  [StatefulSessionInstancePool] Started
> 10:02:07,750 INFO  [StatefulSessionFilePersistenceManager] Starting
> 10:02:07,750 INFO  [StatefulSessionFilePersistenceManager] Started
> 10:02:07,750 INFO  [StatefulSessionContainer] Started
> 10:02:07,750 INFO  [EjbModule] Started
> 10:02:07,750 INFO  [EJBDeployer] Deployed: 
> file:/D:/jboss/server/default/deploy/
> counter.jar
> 10:02:07,781 INFO  [MainDeployer] Deployed package: 
> file:/D:/jboss/server/defaul
> t/deploy/counter.jar
> ****************************************************************
> 
> Or it is anywhere else?
> Thanks for help,
> Jiri
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by Dice.com.
> Did you know that Dice has over 25,000 tech jobs available today? From
> careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
> best hiring companies. http://www.dice.com/index.epl?rel_code=104
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to