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 Re: problem with Geronimo-1.0
Date Wed, 04 Jan 2006 12:21:40 GMT

Hi,


Sorry Aaron about confidential information footers. But i cann't do
anything because it is generated by the mail server.



The value contained in the variable 'gbeanName' is :



geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Serv
er,J2EEServer=geronimo,j2eeType=TransactionManager,

name=TransactionManaer


I have tried the query using the full object name:



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



Its working correctly. I am able to get the TransactionManager instance
using the full GBean name.

But  i would like to know why this thing is not working with
kernel.listGBeans(). Is it a bug in Geronimo-1.0 ?

Rakesh Ranjan



















Re: problem with Geronimo-1.0

Grr, more confidential information footers.  Please don't do that to
public mailing lists!  If your information is confidential, don't send
it to the world, and if it's not confidential, please don't assault us
with the legalese!

Anyway, now that that's off my chest, Geronimo cannot (well,
definitely *should* not) produce an incorrect ObjectName out of thin
air, so you need to figure out where you're getting the ObjectName
containing org/apache/geronimo/Server from.  In the code snippet you
showed, you do a lookup and print all the results, but then you try to
create a proxy using a variable called gbeanName (which I suspect is
what's failing) and you never showed us what that variable holds and
where you got the value in that variable.  Maybe it's hardcoded or in
a config file or something?  You also didn't should the output of your
program where it prints all the matching transaction manager names.
You also didn't give a proper stack trace.  So it's real hard to
troubleshoot from here.  You might want to run it under a debugger and
figure out where the o/a/g/Server is coming from.

If none of this helps you figure out what's going on, please post a
more complete chunk of your code, plus all the pertinent output and a
full stack trace.  Also, please mention what you've deployed into the
server (if anything) other than this application.

Thanks,
    Aaron

On 1/4/06, Ranjan, Rakesh (Cognizant) <Rakesh.Ranjan@...
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=2197634&i=0> >
wrote:
>
>
>
> 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
>





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