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 IndexIBM MQ Java / JMSAPPLTAG(MQSeries Client for Java)

Post new topicReply to topic Goto page 1, 2  Next
APPLTAG(MQSeries Client for Java) View previous topic :: View next topic
Author Message
opmind
PostPosted: Wed May 26, 2004 7:59 am Post subject: APPLTAG(MQSeries Client for Java) Reply with quote

Acolyte

Joined: 04 Dec 2001
Posts: 68

Hello there...

our development team wrote an api from WAS to MQS using a MQSeries Client for Java ... That's ok. But I need to know if it is possible to modify the name seen on dis qstatus ... APPLTAG ?

In fact we have a tracability product which need to know exactely the name of the program of GET and PUT...

THx,

Cyril
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu May 27, 2004 11:57 am Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

If you are talking about finding out which app has the queue open. Check this thread.

http://www.mqseries.net/phpBB2/viewtopic.php?t=9221&highlight=qstatus+handle

If you want to find out programatically you could use Inquire queue status PCF command.

Not sure what you mean by this...
"But I need to know if it is possible to modify the name seen on dis qstatus ... APPLTAG "

Cheers
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Galichet
PostPosted: Tue Jun 01, 2004 1:41 am Post subject: Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 69
Location: Paris - France

In fact the problem is when a java application access a Queue, if we use the command dis qstatus then APPLTAG shows 'websphere MQ Client for Java'.
It is a generic name, not very usefull.
The question in fact is how to do to have instead the java class name ?

I don't know if it is possible ...
_________________
Eric Galichet
SMABTP
France
Back to top
View user's profile Send private message Send e-mail
mqdogsbody
PostPosted: Thu Feb 17, 2011 3:28 am Post subject: Reply with quote

Acolyte

Joined: 01 Jun 2010
Posts: 71

Galichet wrote:
The question in fact is how to do to have instead the java class name ?

I don't know if it is possible ...

Does anyone know? Is it possible? (We are using MQ6.2.)

I know how to change the "put application name" in mesages but not the value that appears in a CONN APPLTAG.
_________________
-- mqDB --
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 17, 2011 7:11 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20336
Location: LI,NY

Galichet wrote:
In fact the problem is when a java application access a Queue, if we use the command dis qstatus then APPLTAG shows 'websphere MQ Client for Java'.
It is a generic name, not very usefull.
The question in fact is how to do to have instead the java class name ?

I don't know if it is possible ...

Don't think that is possible. You should have your different java apps coming in on a different channel. If they are using bindings they should not share queues... at least not for input.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqdogsbody
PostPosted: Thu Feb 17, 2011 8:34 am Post subject: Reply with quote

Acolyte

Joined: 01 Jun 2010
Posts: 71

fjb_saper wrote:
Don't think that is possible.

Good old IBM!

fjb_saper wrote:
You should have your different java apps coming in on a different channel.

That's a solution ... but rather a clumsy one!
_________________
-- mqDB --
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 17, 2011 9:08 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

How is the C runtime based channel program supposed to know what internal component of a standalone java process is taking action at a given time?
Back to top
View user's profile Send private message
mqdogsbody
PostPosted: Thu Feb 17, 2011 10:20 am Post subject: Reply with quote

Acolyte

Joined: 01 Jun 2010
Posts: 71

mqjeff wrote:
How is the C runtime based channel program supposed to know what internal component of a standalone java process is taking action at a given time?

Is that a question for me?

Maybe I have made a wrong assumption but I imagined that the C MQ client library determines the app name in some way and passes it to the channel program in a client-channel message. I guess the Java library must do the same ... but passing in a hard-wired value.

So the silly thing is not making the value settable via the MQEnvironment class (or some other).
_________________
-- mqDB --
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 17, 2011 10:28 am Post subject: Reply with quote

Grand High Poobah

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

mqdogsbody wrote:
So the silly thing is not making the value settable via the MQEnvironment class (or some other).


Which would open the door to application A spoofing itself as application B. Though with proper user security that shouldn't be an issue.

Sounds like you need to raise a requirement.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 17, 2011 10:56 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you wish to express your opinion about how the product SHOULD work, there is an MQ Requirement form you can fill out. It's not too hard to find the link to it with just a bit of searching.

If you wish to know what the right way to solve the problem that you're trying to solve by relying on the WRONG thing (the name of the process that established the connection), then you should describe the problem you are actually trying to solve.
Back to top
View user's profile Send private message
mqdogsbody
PostPosted: Thu Feb 17, 2011 1:14 pm Post subject: Reply with quote

Acolyte

Joined: 01 Jun 2010
Posts: 71

mqjeff wrote:
If you wish to know what the right way to solve the problem that you're trying to solve by relying on the WRONG thing (the name of the process that established the connection you should describe the problem you are actually trying to solve.

The problem I am trying to solve is this:

Whereas the APPLTAG for C/C++ apps shown by the DISPLAY CONN command and by WebSphere MQ Explorer (when you select "Application Connections" for a QM) seems to be set to a useful value, for Java apps it seems to always be "Websphere MQ Client for Java".

Is there a way to get a different value shown? (We'd like something more distinctive displayed, e.g. the name of the main class. We'd be quite happy for it to be necessary for the app to set this itself, e.q. by setting a property of MQEnvironment.)
_________________
-- mqDB --
Back to top
View user's profile Send private message
mqdogsbody
PostPosted: Fri Feb 18, 2011 4:13 am Post subject: Reply with quote

Acolyte

Joined: 01 Jun 2010
Posts: 71

mqdogsbody wrote:
mqjeff wrote:
How is the C runtime based channel program supposed to know what internal component of a standalone java process is taking action at a given time?

Maybe I have made a wrong assumption but I imagined that the C MQ client library determines the app name in some way and passes it to the channel program in a client-channel message. I guess the Java library must do the same ... but passing in a hard-wired value.


And indeed when I run (my own version) of amqsput I see (starting at byte FC)

Code:
2011/02/18 12:02:50: Data on local 12345
0000:  54 53 48 20 00 00 00 A0 01 08 01 00 00 00 00 00 TSH ............
0010:  00 00 00 00 00 00 01 11 03 33 00 00 55 49 44 20 .........3..UID
...
0090:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00A0:  54 53 48 20 00 00 01 30 01 81 30 00 00 00 00 00 TSH ...0..0.....
00B0:  00 00 00 00 00 00 01 11 03 33 00 00 00 00 01 30 .........3.....0
00C0:  00 00 00 00 00 00 00 00 00 00 00 00 20 20 20 20 ............   
00D0:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                 
00E0:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                 
00F0:  20 20 20 20 20 20 20 20 20 20 20 20 61 6D 71 73             amqs
0100:  70 75 74 30 2B 6D 71 41 36 63 00 20 20 20 20 20 put0+mqA6c.     
0110:  20 20 20 20 20 20 20 20 00 00 00 06 05 32 38 39         .....289
0120:  33 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 36..............
...

It doesn't seem unreasonable to want to send a useful value from Java apps.

mqdogsbody wrote:
So the silly thing is not making the value settable via the MQEnvironment class (or some other).

I guess I'd better fill in that MQ requirement from...
_________________
-- mqDB --
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 18, 2011 5:30 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The name of the process is amqsget0.

You are asking that they replace the name of the process with the name of the class.

Have you considered looking at the options available on the System object?

And again, in the case of JEE server, the class that creates the connection may have nothing to do with the class that processes the message.
Back to top
View user's profile Send private message
mqdogsbody
PostPosted: Fri Feb 18, 2011 5:57 am Post subject: Reply with quote

Acolyte

Joined: 01 Jun 2010
Posts: 71

mqjeff wrote:
The name of the process is amqsget0.

Yes, and very helpful it is too! We can look at the appltags and see which of our servers is connected to the QM.

mqjeff wrote:
You are asking that they replace the name of the process with the name of the class.

Well, for Java replacing the current hard-wired string with the name of the process would be of little use, since it will be java or some such.

The name of the main class is really what's wanted in Java as it's the closest to the concept of the "application being run".

But I guess that might not be possible for the MQ Java classes to determine this. (There doesn't seem to be a "main class" system property.) And the main class may be a framework that loads an application. That's why I am suggesting that it be settable.

mqjeff wrote:
And again, in the case of JEE server, the class that creates the connection may have nothing to do with the class that processes the message.

Yes. That's a problem. But not being able to solve all problems is not a reason for solving some. And even "JEE Server" is better than "Websphere MQ Client for Java".

mqjeff wrote:
Have you considered looking at the options available on the System object?

No! Please advise. Which of these options will allow me to see an appltag other than "Websphere MQ Client for Java".
_________________
-- mqDB --
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 18, 2011 6:08 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I guess I didn't really mean the java.lang.System object after all.
Maybe it's one of the properties on Runtime... ? I have hazy memories of being able to set something that changes what the JVM reports as it's process name.

But in no way should MQ be responsible for what name a process using MQ code is reported as being.

And if you can honestly tell anything meaningful about where a connection is coming from based on the name of the process used, you've got a very very strange local environment, and very very strenuous controls over who gets to run which processes on which machines and who can compile any software or rename any files.

As has been said, despite your own unwillingness to believe it, best practices is to give every MQ client application it's own SVRCONN, that has a unique MCAUSER and corresponding SSL setup and SSLPEER to ensure that only the correct certificate can use this channel. IN a JEE server, this is handled with QCFs.

Then you can tell exactly which app is using up all of your available connections.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexIBM MQ Java / JMSAPPLTAG(MQSeries Client for Java)
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.