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 » User defined node cannot read UDP

Post new topic  Reply to topic
 User defined node cannot read UDP « View previous topic :: View next topic » 
Author Message
sajtron
PostPosted: Tue May 31, 2011 7:32 am    Post subject: User defined node cannot read UDP Reply with quote

Novice

Joined: 31 May 2011
Posts: 24

Hi,

I have strange problem. There is a msgflow with defined UDP. The msgflow contains user defined node implemented in Java. When I want to get value of the UDP like this:
Code:
getUserDefinedAttribute("CONST_TAS_CONFIG_FILE");

it just gives me null (the UDP is set to some non-null value). When I try to do it from JavaCompute node it works fine. InfoCenter only says that JavaCompute node can read UDP, but there is no explicit note that user defined nodes cannot.

Is it feature that user defined nodes are not allowed to read UDP?
If not, how to read it?

Thanks in advance.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue May 31, 2011 7:51 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

The Java getUserDefinedAttribute function works within the JCN. It will not work outside of a JCN. Thats why you get null. Find another way to pass-in runtime parameters. An example of another way is a Singleton which reads and stores a properties file.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
sajtron
PostPosted: Tue May 31, 2011 10:10 am    Post subject: Reply with quote

Novice

Joined: 31 May 2011
Posts: 24

Thanks for quick reply.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 31, 2011 10:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should be able to access user defined properties from a user defined node.

You may need to do something other than use a user defined node to DEFINE a user defined property - for example a compute node.

But a JCN is just a subclass of the Java user defined node anyway - that is to say, it's a "general purpose" user defined node.

So there's no technical reason this method should be returning null if you run it in a JCN than in a java user defined node otherwise.

But there may be technical reasons why the user defined property hasn't been defined properly in a java user defined node.
Back to top
View user's profile Send private message
sajtron
PostPosted: Thu Jun 02, 2011 12:52 pm    Post subject: Reply with quote

Novice

Joined: 31 May 2011
Posts: 24

OK now I am a little bit confused
What kind of technical reasons do you mean?
Back to top
View user's profile Send private message
jlaisbett
PostPosted: Fri Jun 03, 2011 12:32 am    Post subject: Reply with quote

Apprentice

Joined: 27 Nov 2009
Posts: 39

There is a way to add support for user defined properties to a java user defined node, I have no idea if it's the only way but it does work (although it ain't the nicest approach in the world).

Open the .msgnode file in a text editor

Find the root tag of your node that will be like:

<eClassifiers xmi:type="eflow:FCMComposite" ...

and add the following attribute to it: udpSupport="true"

You can then use user defined properties the same way you would from a java compute node

I don't really know why the node editor doesn't have a tick box for that, although someone may know a better way to do it.
Back to top
View user's profile Send private message
sajtron
PostPosted: Sun Jun 05, 2011 4:35 am    Post subject: Reply with quote

Novice

Joined: 31 May 2011
Posts: 24

Thanks, and you were right it is not very nice.
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 » User defined node cannot read UDP
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.