Author |
Message
|
knegarpetter |
Posted: Fri Dec 10, 2004 8:25 am Post subject: |
|
|
Apprentice
Joined: 10 Dec 2004 Posts: 39
|
Quote: |
Log on to the Client Server and assume the identity of the USER ID that the code is running under then run the following command:
# echo $MQSERVER
If it is not set then set it using:
# export MQSERVER=
|
hey hey... do I have to have a Client installed on the machine that is running the java code???
(boy do I feel stupid if that is the case)....
thanks a lot for all your help though...
Petter |
|
Back to top |
|
 |
vennela |
Posted: Fri Dec 10, 2004 8:38 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
hey hey... do I have to have a Client installed on the machine that is running the java code??? |
No
All you need is MQ Java/JMS component to be installed if you are using java application in client mode.
But for executing amqsputc you need client.
Can you do telnet <hostnameWhereQMGRisRunning> <portnumerWhereListenerIsRunning> |
|
Back to top |
|
 |
knegarpetter |
Posted: Fri Dec 10, 2004 8:42 am Post subject: |
|
|
Apprentice
Joined: 10 Dec 2004 Posts: 39
|
hi
sorry i dont understand....
MQ Java/JMS component do I install this or is it just .jars to compile the code???
client mode - do i set this with
Code: |
factory.setTransportType(1); |
so my main question is, do i have to install something on my machine that is running the java code.... to be able to connect to the other servers MQ queuemanager...???
im ready to give up and change carrer......
[/code] |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Dec 10, 2004 8:57 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If your program is running far enough to fail, then you probably have the java/jms installed. You shouldn't need to install anything else.
You don't need the WMQ client in order to run java. Do you have an amqsputC executable on your system? If not, you might want to install the WMQ client so that you can do some testing of your configuration independent of the testing of your code. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 10, 2004 11:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
knegarpetter wrote: |
client mode - do i set this with Code:
factory.setTransportType(1); |
Easier: read the using Java manual especially about jndi setup
you need to set the transport type to TCP/IP_CLIENT (see JMSC)
You need to specify
a)host
b)channel (type svrconn)
c)port
d)(qmgr name)
This will allow to connect using the qcf. It will not allow you to do 2 phase commit.
Enjoy [/code] |
|
Back to top |
|
 |
knegarpetter |
Posted: Sun Dec 12, 2004 11:55 am Post subject: |
|
|
Apprentice
Joined: 10 Dec 2004 Posts: 39
|
|
Back to top |
|
 |
knegarpetter |
Posted: Sun Dec 12, 2004 12:50 pm Post subject: |
|
|
Apprentice
Joined: 10 Dec 2004 Posts: 39
|
how on earth do I run the Windows MQ client...???
I guess that thats what you meen witn WMQ Client...
I cant install itt because i have the server installed.... (put not using it this time)..
darn
P |
|
Back to top |
|
 |
csmith28 |
Posted: Sun Dec 12, 2004 2:39 pm Post subject: |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
knegarpetter wrote: |
how on earth do I run the Windows MQ client...???
I guess that thats what you meen witn WMQ Client...
I cant install itt because i have the server installed.... (put not using it this time)..
darn
P |
If you did the standard install of MQ Server the Client filesets are install along with it.
If you want to connect locally as a Client you can use the sample script amqsputc and amqsgetc _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
csmith28 |
Posted: Sun Dec 12, 2004 3:16 pm Post subject: Re: MQJMS2005 failed to create MQQueue Manager |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
knegarpetter wrote: |
well, I get the same error...
when im trying to connect to "any" host... even a host i know doesnt excist... i get reason 2059.
this is driving me nuts... i have to connect to a queueManager on another server, but all i get is... |
Perhaps it will help if we start from the beginning. Vin the MQSeries.net member that started this thread wasn't getting return code 2059 or 2058 he was getting return code 2009. Vin's problem has been resolved.
Vin wrote: |
thanks guys, I did fix this problem but not sure how? all I did was bring MQSeries down and then kill the listener manually (I think this is what made the difference, not sure how). I did check the number of server channels and its only 9, so that does not seem to have caused the problem. |
Please give a more indepth description of your problem:
1. Are you trying to connect to this MQManager from a remote host or does the application reside on the same Server as the MQManager?
2. What Operation System/Version and WMQ Version are you running on the MQManager Server? If the application is local please post the type of Application Server you are using.
If you are trying to connect from a remote host please tell us OS/Version and what if any WMQ Client Filesets have been installed along with what Application Server you are running, WebSphere, WebLogic etc...
3. If possible post a *rinsed sample of the code that is failing.
4. Did this problem start after a change an existing application or is this is new Application? Basically, was it working before?
5. Are you seeing any errors in your AMQERR0*.LOG files that could be related to this issue?
6. Are any .FDC files being generated?
With that information we can more accurately determine what your problem is. Then maybe we can provide better guidance.
*rinsed=please remove/replace anything in your code that may violate your employers security policy. For example if the real server name is beefjerky.donald.trumpcasino.com in the code, change it to a generic host1.domain.com before you post it. Refer to MQManager names in Generic Terms like MQMGR01 instead of posting the actual name of the MQManager. _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
knegarpetter |
Posted: Mon Dec 13, 2004 9:35 am Post subject: |
|
|
Apprentice
Joined: 10 Dec 2004 Posts: 39
|
ok, i think i got it up and running, thanks for all your help... i wouldnt have managed othervise...
one thing though...
The senario.
Im on a another server(A) than the MQ-server (B)... (and i can recieive incomming messages) this MQ-server is connected to another MQ server(C), with channels and such... if you understand my description... anyway the sending from the remote remote (C) server to our MQ server (B) works fine, and I can "download" then in my java application on server(A).
but then i send messages on the outgoing transmission Queue (on B), it works, BUT the messages STAYS on the Transmission queue... and doesnt get sent to the server (C)... confusing i know.
this is my java code
Code: |
public SimpleMQSender() throws JMSException{
try{
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setTransportType(1);
factory.setQueueManager("INTV3.QM");
factory.setHostName("PXI-RHDLV117.OURHOUSE.COM");
connection = factory.createQueueConnection();
session = connection.createQueueSession(true, Session.DUPS_OK_ACKNOWLEDGE);
Queue myQueue = session.createQueue("HOST.INTV1.Q");//Transmission queue
queueSender = session.createSender(myQueue);
send("testing");
connection.start();
Thread.sleep(1000);
connection.close();
|
do I have to set the channel
Code: |
factory.setChannel("INTV1.MT.C"); |
?? because when I do, it wont connect at all....
regards Petter |
|
Back to top |
|
 |
knegarpetter |
Posted: Mon Dec 13, 2004 9:37 am Post subject: |
|
|
Apprentice
Joined: 10 Dec 2004 Posts: 39
|
this is the "conf" file for the server...
def qr (INTV1.Q.TX) +
descr('Cola remota de INTV1') +
defpsist(YES) +
put(ENABLED) +
rqmname(PAM.QM) +
rname(INTV1.Q.RX) +
xmitq(HOST.INTV1.Q)
* Creamos la cola de transmisión
def ql (HOST.INTV1.Q) +
descr('Cola local de Transmision de INTV1') +
defpsist(YES) +
put(ENABLED) +
trigger +
initq(SYSTEM.CHANNEL.INITQ) +
trigdata(INTV1.MT.C) +
trigtype(FIRST) +
usage(XMITQ)
* Creamos la cola de recepción de mensajes
def ql (INTV1.Q.RX) +
descr('Cola local de Recepcion de INTV1') +
defpsist(YES) +
put(ENABLED) +
usage(NORMAL)
* Creamos la cola de recepción de notificaciones
def ql (INTV1.Q.RX) +
descr('Cola local de Notificaciones de INTV1') +
defpsist(YES) +
put(ENABLED) +
usage(NORMAL)
* Creamos la cola de recepción de rechazados
def ql (INTV1.Q.RECH) +
descr('Cola local de Rechazados de INTV1') +
defpsist(YES) +
put(ENABLED) +
usage(NORMAL)
* Creamos el canal de transmisión
def chl (INTV1.MT.C) chltype (SDR) +
trptype(TCP) +
conname(123.123.123.123) +
convert(YES) +
xmitq(HOST.INTV1.Q) +
descr('Canal de Transmision de INTV1') +
longtmr(60) +
shortrty(60) +
shorttmr(10)
* Creamos el canal de recepción
def chl (INTV1.MO.C) chltype (RCVR) +
trptype(TCP) +
descr('Canal de Recepcion de INTV1') |
|
Back to top |
|
 |
csmith28 |
Posted: Mon Dec 13, 2004 12:55 pm Post subject: |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
Try this:
Code: |
# echo "alter ql(HOST.INTV1.Q) PROCESS(INTV1.MT.C)" | runmqsc |
and make sure your TRIGDEPTH is (1). _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
knegarpetter |
Posted: Tue Dec 14, 2004 12:27 am Post subject: |
|
|
Apprentice
Joined: 10 Dec 2004 Posts: 39
|
hi
ok...
hmmm, what would this "line" do??
The trigdpth is 1...
regards
Petter |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Dec 14, 2004 7:16 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Quote: |
what would this "line" do??
The trigdpth is 1... |
Nothing. It is a red herring. TRIGDPTH is ONLY used with TRIGTYPE(DEPTH). For TRIGTYPE of FIRST or EVERY, TRIGDPTH is ignored.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
csmith28 |
Posted: Tue Dec 14, 2004 11:00 am Post subject: |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
knegarpetter wrote: |
hi
ok...
hmmm, what would this "line" do??
The trigdpth is 1...
regards
Petter |
Nevermind you had your XMITQ Def correct, I was thinking of the old way to set up tiggering. _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
|