OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | carol List | Febuary 2003 Index

<--  Date Index  --> <--  Thread Index  -->

Re: Jetty + JNDI


Miroslav.Halas@xxxxxxxxxxxxxx wote :
> Hi Guillaume,

Hi Miro,

> thank you very much that fixed it and I can now start Jetty + JOTM + Carol
> without any errors. I have couple of questions, I would appreciate your
> help if you find a moment.
> 
> I looked at Jeff's dbtest.war code and he is doing this
> 
> DataSource datasource = (DataSource)context.lookup
> ("java:comp/env/jdbc/myDB");
> UserTransaction usertransaction = (UserTransaction)context.lookup
> ("java:comp/UserTransaction");
> 
> Could you please give me your insight how do I create the context s
> java:comp/ and java:comp/env/? I looked what Greg did in Jetty for Tyrex
> and his code looks like this
> 
>         _root = new MemoryContext(hashtable);
>         _rootComp = _root.createSubcontext("comp");
>         _rootCompEnv = _rootComp.createSubcontext("env");
> 
> It looks like I need to register all datasources and other
> resource-ref, resource-env-ref, ejb-ref, ejb-local-ref, security-domain
> under java:comp/env/

Yes, I think that Jetty have to register resources inside java:com and
java:comp/env.

We may have to develop a JNDI SPI for this. This is not very long. 
May be JOTM or Jetty should provide is JNDI implementation of 
java:comp and java:comp/env. 

We can use the one for Jetty and Tyrex or redevelop a JNDI using The
Jonas one, for example (org.objectweb.jonas.naming). It's depends on
the needed of each projects. 

For me there is no problems with integration of a JNDI ENC "java:comp"
with the LMI environment and context.

ENC can be can be just an indirection for ressources name classification
in J2EE environment.


> Another note, just to avoid confusion for other users, when I start JOTM it
> prints
> main : Carol file used is carol.properties in a jar file
> main : Carol file used is jndi.properties in a jar file
> even those files are on the classpath in directory and not in jar file
> which can be proven because If I remove those files I get an error
> 
> main : Exception occur when loading default/carol/jndi configuration file:
> java.util.MissingResourceException: Can't find bundle for base name carol,
> local
> e en_US
>         at
> java.util.ResourceBundle.throwMissingResourceException(ResourceBundle
> ..java:804)

Ok, this is my fault: 
I have to write 
 "through URLClassLoader" instead of "in a jar file"

This minor bug is going to be corrected in the 1.3.2 version
 
> AN another thing, I have changed carol.properties to
> carol.rmi.activated=lmi
> to use just the in-memory  context. What should I put into jndi.properties?
> Does it matter. THis is what Carol prints out when it starts, could you
> please look over it if it look OK with you? Basically I am just trying to
> start lmi.

Yes, it's ok for me, the confusion is that there is many defaults for
carol properties. So all those defaults properties are written inside
the carol traces. Do you think that carol should trace only the used
properties ?
This is probably a good idea, with more readable traces.
I can set this features in the next version. 


So the lmi seam to work fine ? 
Nice ! This is, I think, experimental and non standard rmi and jdni
features but, without java serialization, we can get a big performance
enhancement for J2EE features !

Thank you for this feedback, I'm going to adapt carol traces soon as
possible.

Guillaume


> main : Carol file used is carol-defaults.properties in a jar file
> main : Carol file used is carol.properties in a jar file
> main : Carol file used is jndi.properties in a jar file
> main : Carol use carol file to activate RMI: lmi
> main : Global Carol configuration is:
> main : Multiple RMI is false
> main :
> carol.jndi.cmi.java.naming.factory.initial=org.objectweb.carol.halborb.jn
> di.CmiInitialContextFactory
> main : carol.jndi.cmi.java.naming.provider.url=jrmi://localhost:2002
> main :
> carol.jndi.iiop.java.naming.factory.initial=org.objectweb.carol.jndi.iiop
> ..IIOPReferenceContextWrapperFactory
> main : carol.jndi.iiop.java.naming.provider.url=iiop://localhost:2000
> main :
> carol.jndi.jeremie.java.naming.factory.initial=org.objectweb.jeremie.libs
> ..services.registry.jndi.JRMIInitialContextFactory
> main : carol.jndi.jeremie.java.naming.provider.url=jrmi://localhost:2001
> main :
> carol.jndi.jrmp.java.naming.factory.initial=com.sun.jndi.rmi.registry.Reg
> istryContextFactory
> main : carol.jndi.jrmp.java.naming.provider.url=rmi://localhost:1099
> main :
> carol.jndi.lmi.java.naming.factory.initial=org.objectweb.carol.jndi.lmi.L
> miInitialContextFactory
> main : carol.jndi.lmi.java.naming.provider.url=lmi://nohost:noport
> main : carol.jvm.jrmp.server.portnumber=0
> main :
> carol.jvm.org.objectweb.PortableInterceptor.JRMPInitializerClass.org.obje
> ctweb.carol.rmi.jrmp.interceptor.ProtocolInterceptorInitializer=
> main :
> carol.jvm.org.omg.PortableInterceptor.ORBInitializerClass.org.objectweb.c
> arol.rmi.iiop.interceptor.ProtocolInitializer=
> main : carol.rmi.activated.default=jrmp
> main :
> carol.rmi.cmi.NameServiceClass=org.objectweb.carol.jndi.ns.CmiRegistry
> main :
> carol.rmi.cmi.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.Cmi
> PRODelegate
> main :
> carol.rmi.iiop.NameServiceClass=org.objectweb.carol.jndi.ns.IIOPCosNaming
> 
> main :
> carol.rmi.iiop.PortableRemoteObjectClass=com.sun.corba.se.internal.javax.
> rmi.PortableRemoteObject
> main :
> carol.rmi.jeremie.NameServiceClass=org.objectweb.carol.jndi.ns.JeremieReg
> istry
> main :
> carol.rmi.jeremie.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi
> ..JeremiePRODelegate
> main :
> carol.rmi.jrmp.NameServiceClass=org.objectweb.carol.jndi.ns.JRMPRegistry
> main :
> carol.rmi.jrmp.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.Jr
> mpPRODelegate
> main :
> carol.rmi.lmi.NameServiceClass=org.objectweb.carol.jndi.ns.LmiRegistry
> main :
> carol.rmi.lmi.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.Lmi
> PRODelegate
> main : carol.start.jndi=true
> main : carol.start.ns=true
> main : carol.start.rmi=true
> main : Start non started Name Servers
> main : NameServiceManager.NameServiceManager()
> main : NameServiceManager.getNSManagerCurrent()
> main : NameServiceManager.startNonStartedNS()
> main : LMIRegistry.start() on port:0
> main : MultiOrbInitialContextFactory.getInitialContext(Hashtable env)
> main : LmiInitialContext.LmiInitialContext(Hashtable env)
> main : ProtocolCurrent.ProtocolCurrent()
> main : Number of rmi:1
> main : Default:lmi
> main : MultiPRODelegate.exportObject(TransactionFactoryImpl obj)
> main : MultiOrbInitialContextFactory.getInitialContext(Hashtable env)
> main : LmiInitialContext.LmiInitialContext(Hashtable env)
> main : LmiInitialContext.rebind("javax.tranasction.UserTransaction",Current
> obje
> ct)
> 
> Thanks
> 
> Miro
> 
> 
> 
>                                                                             
>                                              
>                     Guillaume.riviere@in                                    
>                                              
>                     rialpes.fr                 To:     carol@xxxxxxxxxxxxx  
>                                              
>                                                cc:                          
>                                              
>                     02/24/2003 10:00 AM        Subject:     Re: [carol] 
> Carol 1.3.0                                      
>                                                                             
>                                              
>                                                                             
>                                              
> 
> 
> 
> 
> Hi Miro,
> 
> this is now corrected in the 1.3.1 version available on the web site
> or on the objectweb forge.
> 
> Guillaume
> 
> 
> 
> 
> 
> 

-- 
Guillaume Riviere
INRIA -- SARDES/IMPACT
ObjectWeb Consortium
+(33)476615525 



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.