Hi friends,

I am trying to get a reference to Geronimo TransactionManager. For this, I have done the following things : -

a)       Getting a reference to the kernel using the KernelRegistry class.

b)       Then searching the TransactionManager GBean using a pattern.

c)       Finally getting the TransactionManager reference using the searched Gbean.

 

 

Here the code snippet :

 

Kernel kernel=KernelRegistry.getSingleKernel();

ObjectName gbQuery = JMXUtil.getObjectName("*:j2eeType=TransactionManager,*");

Set gbeanNames = kernel.listGBeans(gbQuery);

for (Iterator i = gbeanNames.iterator(); i.hasNext();) {

      ObjectName gbeanName = (ObjectName) i.next();

      System.out.println(gbeanName1);

}

TransactionManager tm = (TransactionManager) kernel.getProxyManager().createProxy(gbeanName, ransactionManager.class);

 

 

 

When I am using this with the Geronimo-1.0-M5, this is working correctly. But with Geronimo-1.0 , this is not working correctly.

 

With Geronimo-1.0, I am getting the following Exception :

 

java.lang.IllegalArgumentException:

 Could not get GBeanInfo for target object:

geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=TransactionManager,name=TransactionManager

 

I think kernel.listGBeans() is not working correctly in case of Geronimo-1.0. According to the above code, the GBean is

geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=TransactionManager,name=TransactionManager

 

But as much I know, it should be

 

geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-server/1.0/car,J2EEServer=geronimo,j2eeType=TransactionManager,name=TransactionManager

 

Can anybody please help me whether there is any fault with Geronimo-1.0 or something else.

 

Regards,

Rakesh Ranjan

 

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

Visit us at http://www.cognizant.com