geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siraj Mohamed" <Si...@virtusa.com>
Subject KernelRegistry does not return a reference to Kernel
Date Mon, 20 Mar 2006 11:21:57 GMT
Hi All,
 
I am using WASCE 1.0.0.1 version and I am trying to get a reference to
the TransactionManger from a Java class. This is the segment of my java
class.
 
TransactionManager tm = null;
try
{
            ObjectName TM_NAME = new
 
ObjectName("geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2e
e-server/1.0/car,J2EEServer=geronimo,j2eeType=TransactionManager,name=Tr
ansactionManager");
                                               
                                               
            Kernel kernel = KernelRegistry.getSingleKernel();
            tm =
(TransactionManager)kernel.getProxyManager().createProxy(TM_NAME,
            TransactionManager.class);
 
}catch (Exception e)
{
            throw new
TransactionManagerFactoryException(e.getMessage());
}
 
This code does not work for me and I get a null return value when trying
to get the Kernel (KernelRegistry.getSingleKernel()).
 
Am I missing some thing else? My WASCE application server is running up
and down.
 
Please help me if any one knows the solution.
 
Thanks and Regards,
Siraj

Mime
View raw message