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

Post new topic  Reply to topic
 java compute node « View previous topic :: View next topic » 
Author Message
kathir
PostPosted: Mon Sep 26, 2011 4:16 am    Post subject: java compute node Reply with quote

Apprentice

Joined: 12 Sep 2011
Posts: 30

Please could some help on how to use java compute node to read a propery file ?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 26, 2011 4:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You write Java code to read a file, and then treat it as properties.

But DO NOT DO THIS.

Use User Defined Properties *instead*.

Write Java code to access User Defined Properties.

And strongly consider getting a significant amount of training on a) the java programming language, b) Message Broker. In that order. You have not demonstrated any competence in either one, and this may lead to you creating solutions that are not viable in a production environment. Which may lead you to getting fired. Aside from the potentially millions of dollars of damage your bad code could cause - depending on who you work for.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Sep 26, 2011 4:45 am    Post subject: Reply with quote

Jedi Knight

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

I think someone may like to post the link to WMB training. FNG.
_________________
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
zpat
PostPosted: Mon Sep 26, 2011 5:04 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Better to use the FileRead node.

I have seen developers using Java code to read/write files, SFTP files and access databases directly instead of using WMB facilities to do this.

JCNs are really dangerous in the hands of those who understand Java and don't understand WMB. I wish I could apply an ACL to them!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 26, 2011 5:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

zpat wrote:
JCNs are really dangerous in the hands of those who understand Java and don't understand WMB.


And twice as bad for those that don't understand Java OR WMB.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon Sep 26, 2011 5:49 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

mqjeff wrote:
zpat wrote:
JCNs are really dangerous in the hands of those who understand Java and don't understand WMB.


And twice as bad for those that don't understand Java OR WMB.



I agree agree agree well said

This is what happening now in the market
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Sep 26, 2011 6:25 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Some developers mistakenly believe that WMB is just a container for a series of Java programs invoked in sequence (using JCNs). It's partly a cultural issue of not asking for help. Much better to ask than to mis-understand. We like to be asked how to best do things (before or instead of "why doesn't this work").

In general terms, if you can't do it without using a JCN, then you shouldn't be doing it using a JCN. Using a JCN is primarily a syntax option over ESQL and not an invitation to use external JAR files. Any use of a JAR file in WMB should be cleared with your WMB expert to ensure it is really necessary. In most cases it is due to a lack of knowledge of the standard WMB features.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Sep 26, 2011 6:50 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Quote:
In general terms, if you can't do it without using a JCN, then you shouldn't be doing it using a JCN.


There is an exception to that general rule. These are the cases where class libraries for certain things make life easy. for example TAM. Trying to manage them from ESQL is a PITA. If you knew me, you would know that I'm (apart from probably Vitor ) the last person to recomment JCN's.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Sep 26, 2011 8:37 am    Post subject: Reply with quote

Grand High Poobah

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

smdavies99 wrote:
I'm (apart from probably Vitor ) the last person to recomment JCN's.


You'll never steal last place from me....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Mon Sep 26, 2011 9:06 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

zpat wrote:
I have seen developers using Java code to read/write files, SFTP files and access databases directly instead of using WMB facilities to do this.

JCNs are really dangerous in the hands of those who understand Java and don't understand WMB. I wish I could apply an ACL to them!




I once had a new broker developer (with Java experience) ask me to put the MQ jar files into /var/mqsi/shared-classes.

We had a little talk about what was appropriate for JCN's and what was not.
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 » 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.