Hi,

I was wondering if it is possible to call a static method from a class which has
been studied by Inline::Java, if there is no constructor available for the
class. For example, I have written the following script:

----------------------------------------------------------------------------------
#C:\sonicMQ-Perl\ShowQueues.pl

use Inline Java => 'STUDY', STUDY =>
['com.sonicsw.mq.mgmtapi.runtime.MQProxyFactory'];

#a bunch of perl commands

my $broker =
com::sonicsw::mq::mgmtapi::runtime::MQProxyFactory->createBrokerProxy($connector,
$jmxName); #line 23

my $queues = $broker->getQueues(0); #line 24

#some more perl commands

--------------------------------------------------------------------------------

It is to be noted here that I have already defined $connector and $jmxName
before calling the static method, createBrokerProxy. I have also looked at the
java API used here, and the CLASSPATH environment variable, and they all seem to
be fine. When I try to run this script, I get the following error:

--------------------------------------------------------------------------------

Can't call method 'getQueues' on an object (Inline::Java::Object) that is not bo
und to Perl at C:\sonicMQ-Perl\ShowQueues.pl line 24

--------------------------------------------------------------------------------

What am I doing wrong here? I'll appreciate any point-outs.

Thanks.

Vishal

----------------------------------------
This mail sent through www.mywaterloo.ca

Reply via email to