geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ranjan, Rakesh \(Cognizant\)" <Rakesh.Ran...@cognizant.com>
Subject problem with Geronimo-1.0
Date Wed, 04 Jan 2006 09:14:15 GMT

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/Serv
er,J2EEServer=geronimo,j2eeType=TransactionManager,name=TransactionManag
er



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/Serv
er,J2EEServer=geronimo,j2eeType=TransactionManager,name=TransactionManag
er



But as much I know, it should be



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



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
Mime
View raw message