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 » Accessing Global environment ArrayList Variables from JCN..

Post new topic  Reply to topic
 Accessing Global environment ArrayList Variables from JCN.. « View previous topic :: View next topic » 
Author Message
bpkumar2
PostPosted: Fri Dec 28, 2012 5:26 am    Post subject: Accessing Global environment ArrayList Variables from JCN.. Reply with quote

Newbie

Joined: 11 Dec 2012
Posts: 8

Any Idea how to read Envrionment Variables Array from java compute node which are assigned in Compute node ?. For example...
Code:
ComputeNode:
SET Environment.Variables.NameArr[1]= 'Name1';
SET Environment.Variables.NameArr[2] = 'Name2';
SET Environment.Variables.NameArr[3] = 'Name3';
SET Environment.Variables.NameArr[4] = 'Name4';


JCN:
MbElement env = assembly.getGlobalEnvironment().getRootElement() ;
String varlob= env.getFirstElementByPath("Variables/NameArr[1]").getValu1eAsString();
String varlob2= env.getFirstElementByPath("Variables/NameArr[2]").getValueAsString();
....................................
..................................

I am getting always first row for below code... i.e Name1 not able to all the variables..
Code:
String varlob= env.getFirstElementByPath("Variables/NameArr").getValu1eAsString();
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Dec 28, 2012 5:53 am    Post subject: Re: Accessing Global environment ArrayList Variables from JC Reply with quote

Jedi Knight

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

bpkumar2 wrote:
Any Idea how to read Envrionment Variables Array from java compute node which are assigned in Compute node ?. For example...
Code:
ComputeNode:
SET Environment.Variables.NameArr[1]= 'Name1';
SET Environment.Variables.NameArr[2] = 'Name2';
SET Environment.Variables.NameArr[3] = 'Name3';
SET Environment.Variables.NameArr[4] = 'Name4';


JCN:
MbElement env = assembly.getGlobalEnvironment().getRootElement() ;
String varlob= env.getFirstElementByPath("Variables/NameArr[1]").getValu1eAsString();
String varlob2= env.getFirstElementByPath("Variables/NameArr[2]").getValueAsString();
....................................
..................................

I am getting always first row for below code... i.e Name1 not able to all the variables..
Code:
String varlob= env.getFirstElementByPath("Variables/NameArr").getValu1eAsString();


Did you ever bother to attend the WMB developers training class or search the InfoCentre or use the WMB samples?

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.samples.scanodes.doc/doc/create_transferrequest.htm


Code:
  //Get the next part
  part = part.getNextSibling();

_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Accessing Global environment ArrayList Variables from JCN..
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.