ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MbNode methods not accessible outside of Java Compute Node

Post new topic  Reply to topic
 MbNode methods not accessible outside of Java Compute Node « View previous topic :: View next topic » 
Author Message
jboller001
PostPosted: Tue Aug 22, 2006 1:30 pm    Post subject: MbNode methods not accessible outside of Java Compute Node Reply with quote

Apprentice

Joined: 31 May 2006
Posts: 40

I'm planning on creating a class that will serve as a single point of access for interacting with a particular database table. I've defined various CRUD methods in this class that will be available to all of my Java Compute Nodes. Also, I'd like to use the MbSQLStatement class for its transaction and connection management capabilities. I really don't want to spend time writing a JDBC connection pool.

I created a class that extends MbNode hoping that the createSQLStatement and other methods (getExcecutionGroup etc.) would be available to me. I've discovered that extending this class alone does not do the trick. When I run a transaction, the flow hangs on the line that calls createSQLStatement or any other MbNode method. I tried implenting the MbNodeInterface, extending MbJavaCompute and extending MbInputNode and have not had any luck.

Does anyone know how to utilize the MbSQLStatement class outside of a Java Compute Node?

Thanks,
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 22, 2006 2:10 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can't use the MbSQLStatement class outside of a Broker JVM. This can be either inside a JCN or inside a Java plugin.

You also can't simply create an MbNode "on the fly".

You can have all of your JCNs pass in a reference to themselves, and then use that within your service class.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jboller001
PostPosted: Tue Aug 22, 2006 3:16 pm    Post subject: Reply with quote

Apprentice

Joined: 31 May 2006
Posts: 40

Thanks, passing the JCN referenced worked.
Back to top
View user's profile Send private message
jboller001
PostPosted: Tue Aug 22, 2006 5:30 pm    Post subject: Reply with quote

Apprentice

Joined: 31 May 2006
Posts: 40

This may be a dumb question but would there be a significant performance hit having a JCN pass a reference to itself to another class for every message?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 23, 2006 1:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Well, there's going to be a performance hit for instantiating the class, but that's going to be small.

And passing a reference shouldn't be a large performance hit either...

And you have good reason for putting reusable logic in one place instead of many, so any miniscule performance hit is justfified.

On the other hand, you don't want to layer in ten classes, and pass everything ten classes down and back just because it makes a pretty class diagram. A flatter hierarchy does perform better - but two layers instead of one isn't going to make much difference.

But if you're really concerned about performance, you need to have business requirements for performance that you can measure and then tests that can measure the performance and the ability to gather metrics to determine if the tests passed or failed.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MbNode methods not accessible outside of Java Compute Node
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.