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 » java compute node setting local environment

Post new topic  Reply to topic
 java compute node setting local environment « View previous topic :: View next topic » 
Author Message
arvind kris
PostPosted: Thu Oct 25, 2007 4:50 pm    Post subject: java compute node setting local environment Reply with quote

Newbie

Joined: 25 Oct 2007
Posts: 4

I am having issues setting queuename in the local environment.
I am using a java compute node and xpath.
can some one post a sample working code
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 25, 2007 10:46 pm    Post subject: Re: java compute node setting local environment Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

arvind kris wrote:
I am having issues setting queuename in the local environment.


What issues? Error code? Java dump? Spirit voices warning of doom?

A little more information may help us help you. Particually why you're setting queue name like that.

Or do you mean local environment rather than LocalEnvironment?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 26, 2007 4:53 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm sure that arvind.kris is trying to save a queue name into LocalEnvironment, in order to re-use it later after wherever it's been stored has been overwritten by something else.

But it would be easier to see the code that's been tried.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
arvind kris
PostPosted: Fri Oct 26, 2007 9:26 am    Post subject: Exception Reply with quote

Newbie

Joined: 25 Oct 2007
Posts: 4

EXCEPTION IS AS BELOW
Setting root element throwing Exception other than MBEX
<com.ibm.broker.plugin.MbBrokerException source:BIPv600 key:2230 message:[BIPv600:2230]BIP2230E: Error detected whilst processing a message in node 'Caught exception and rethrowing'.

The message broker detected an error whilst processing a message in node 'Caught exception and rethrowing'. An exception has been thrown to cut short the processing of the message.

See the following messages for details of the error. : Caught exception and rethrowing >
at com.ibm.broker.plugin.MbOutputTerminal._propagate(Native Method)
at com.ibm.broker.plugin.MbOutputTerminal.propagate(MbOutputTerminal.java:140)
at MUFIDS_JavaCompute.evaluate(TEST_JavaCompute.java:85)
at com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:146)
at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1222)

There is a null pointer at propogate to output terminal.

If you have done something similar then can you send a sample code that works.
Back to top
View user's profile Send private message
arvind kris
PostPosted: Fri Oct 26, 2007 9:28 am    Post subject: loval environment Reply with quote

Newbie

Joined: 25 Oct 2007
Posts: 4

Printing local environment shows
(
(0x01000000):LocalEnvironment = (
(0x01000000):Destination = (
(0x01000000):MQ = (
(0x01000000):DestinationData = (
(0x03000000):queuename = 'UAQ.MUFIDS.OMA.OUT.TEST'
)
)
)
)
)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 26, 2007 9:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Did you look here:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac30470_.htm

?

What is the code you've written?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
arvind kris
PostPosted: Fri Oct 26, 2007 2:25 pm    Post subject: Reply with quote

Newbie

Joined: 25 Oct 2007
Posts: 4

Guys does any one have a sample java code using DestinationList.
Back to top
View user's profile Send private message
Miriam Kaestner
PostPosted: Fri Nov 09, 2007 3:45 pm    Post subject: Reply with quote

Centurion

Joined: 26 Jun 2001
Posts: 103
Location: IBM IT Education Services, Germany

This works for me:


public void evaluate(MbMessageAssembly contact admin) throws MbException {
MbOutputTerminal out = getOutputTerminal("out");
MbOutputTerminal alt = getOutputTerminal("alternate");

// ----------------------------------------------------------
// Add user code below
MbMessage outLocalEnv = new MbMessage(contact admin.getLocalEnvironment());
MbElement oLE = outLocalEnv.getRootElement();
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,
outLocalEnv, contact admin.getExceptionList(), contact admin
.getMessage());
MbMessage inMsg = contact admin.getMessage();
String rtsService = (String) inMsg
.evaluateXPath("string(CC_Order/Routing_Slip/Service/Name)");
oLE.evaluateXPath("string(?Destination/?MQ/?$DestinationData/?queueName[set-value('" + rtsService+"')]");

outLocalEnv.finalizeMessage(MbMessage.FINALIZE_NONE);

// End of user code
// ----------------------------------------------------------

// The following should only be changed
// if not propagating message to the 'out' terminal

out.propagate(outAssembly);
}
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » java compute node setting local environment
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.