Re: OpenJMS alpha and JMeter
Tim Anderson <[email protected]> Tue, 26 Dec 2006 16:16:51 +1100
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Hermant,
finally got a chance to look at the activemq-jmeter sources.
The reason you're seeing the 'Mismatched destination properties' is because
of the
org.activemq.util.connection.ServerConnectionFactory.createDestination()
method.
For both all destination types it is using:
} else if (OPENJMS_SERVER.equals(mqServer)) {
if (isTopic) {
return ((TopicSession) session).createTopic(subject);
} else {
return ((QueueSession) session).createQueue(subject);
}
}
The createTopic() and createQueue() methods should not be used for
administered destinations -
these should be obtained from JNDI.
Regards,
Tim
Hemant Gaur wrote:
>
>
> For resolving the openJMS alpha and JMeter compatibility error I
> downloaded alpha source and build it locally using maven.
>
> Debugging showed the error "Mismatched destination properties" coming
> from the OpenJMS alpha server is because the class
> org.exolab.jms.messagemgr.ConsumerManagerImpl.getDestination checks the
> incoming topic type to be persistent.
> if (existing.getPersistent() != destination.getPersistent()) { throw
> exception }
>
> Now these existing and incoming topics(existing and destination) are
> the objects of JMSTopic whose super class JmsDestination has the member
> variable _persistent defaulted to false.
>
> 1.) I changed this to true and recompiled and plugged the
> openjms-0.7.7-alpha-3.jar into setup.
> JMeter tests were able to publish and subscribe the messages but after
> publishing nearly 800 messages the OpenJMS stops responding. No error is
> in the JMeter or JMS logs.
>
> 2.) Just to be sure that I have not broken any logical flow, I reverted
> the above change and put the call for setting the Topic to persistent
> (topic.setPersistent(true)) in the consumer subscription request only
> (RemoteServerSession.createDurableConsumer()).This also had the same
> fate after nearly 1000 messages published and subscribed.
>
> 3.) Also just commenting the check for the persistent in the original
> exception location had the same results.
>
>
>
>
> <http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: OpenJMS alpha and JMeter
> From:
> Jonas Lim <[email protected]>
> To:
> Hemant Gaur <[email protected]>
>
> To:
> Hemant Gaur <[email protected]>
>
>
>
> Hi Hemant ,
>
> Not really sure how much help I can give on this one. I haven't
> actually used OpenJMS that much. I'm more into ActiveMQ :-)
>
> I'll try to take a look at. I'll let you know what I find. You may
> also want to try the OpenJMS community on changes made to the Alpha
> version specically on administering destinations
>
> Regards
> Jonas
>
>
>
>
> Hemant Gaur wrote:
>>
>> Hi,
>> Sorry for sending you the mail directly. This was urgent and i think
>> u can help me out.
>> I am trying to run the jmeter performance tests on the OpenJMS.
>> Though I am able to get the tests running and results for release
>> version there is an exception thrown in the duable/persistant
>> subscriber for the OpenJMS alpha.
>> Mismatched destination properties for destination with
>> name=TOOL.DEFAULT.TOPIC0
>> at
>> org.exolab.jms.messagemgr.ConsumerManagerImpl.getDestination(ConsumerManagerImpl.java:772)
>>
>> at
>> org.exolab.jms.messagemgr.ConsumerManagerImpl.createInactiveDurableConsumer(ConsumerManagerImpl.java:571)
>>
>> at
>> org.exolab.jms.messagemgr.ConsumerManagerImpl.createDurableConsumer(ConsumerManagerImpl.java:345)
>>
>> at
>> org.exolab.jms.server.ServerSessionImpl.createDurableConsumer(ServerSessionImpl.java:343)
>>
>> at
>> org.exolab.jms.server.net.RemoteServerSession.createDurableConsumer(RemoteServerSession.java:245)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> org.exolab.jms.net.orb.DefaultORB$Handler.invoke(DefaultORB.java:553)
>> at org.exolab.jms.net.orb.DefaultORB$1.run(DefaultORB.java:511)
>> at
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> Source)
>> at java.lang.Thread.run(Thread.java:595)
>>
>>
>> ON searching i found the explaination for this (By Tim Anderson):
>> ========================================================
>> The topic you are using doesn't have the same properties as
>> a destination with the same name, being managed by the server.
>> This will typically happen if you have used the
>> TopicSession.createTopic()method giving a name for a topic that is
>> persistent on the server. For persistent topics, you should look them
>> up using JNDI.
>> -Tim
>> ==========================================================
>>
>> As I dont build the JMeter or OpenJMS locally and hence have no
>> control over the source. I have this topic populated using the
>> OpenJMS config file using
>>
>> <AdministeredDestinations>
>> <AdministeredTopic name="TOOL.DEFAULT.TOPIC0"/>
>> </AdministeredDestinations>
>>
>> Can there be any settings which makes me work this with the alpha
>> version. Things are already working with the same test case using the
>> OpenJMS release version.
>>
>>
>> Relevant code from the openJMS ConsumerManagerImpl.getDestination()
>> ------------------------------------------------------------
>> if(!destination.getClass().getName().equals(existing.getClass().getName()))
>>
>> throw new InvalidDestinationException("Mismatched
>> destination properties for destination with name=" + name);
>> if(existing.getPersistent() != destination.getPersistent())
>> throw new InvalidDestinationException("Mismatched
>> destination properties for destination with name=" + name);
>>
>> ------------------------------------------------------------
>>
>> Many Thanks,
>> Hemant
>>
>>
>>
>> <http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV