We are now in the progress to start sending messages via JMS to the IBM Messagebroker, but we do not seem to get it right.
We have set up a JMS provider, we picked the top one of the WebSphere MQ Messageing Providers with Node=servernameCellManager01 .
There defined everything, queue connection factory, queues and so on.
In the jmsGetContext function we need to provide an url and a jndiFactory.
No here is where we get stuck. How to get this working. For now we have this:
var myContext= jmsGetContext("iiop:localhost:2809","com.ibm.websphere.naming.WsnInitialContextFactory");
the second line already returns an exception. That is because the jmsGetContext is not correct and we do not get a context back.
Is there someone that can help me out please.
This topic has been locked.
6 replies Latest Post - 2012-11-21T08:34:15Z by SystemAdmin
Pinned topic Communicating with JMS not working
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-21T08:34:15Z at 2012-11-21T08:34:15Z by SystemAdmin
Re: Communicating with JMS not working2012-11-14T15:15:55Z in response to SystemAdminHere is your solution:
I will help more if needed, but inthere it is described what to do.
I followed the instructions and now things are moving through the system.
Re: Communicating with JMS not working2012-11-15T06:10:42Z in response to SystemAdminI can get jms Context using script below in script sandbox, but it is not work in Reports console
Port I get BOOTSTRAP_ADDRESS from WAS.
What exception you get on second line? NullPointerException?
KaranBal 270004GTF1108 PostsACCEPTED ANSWER
Re: Communicating with JMS not working2012-11-21T00:40:29Z in response to SystemAdminI am not an expert in JMS message brokers and am not qualified to comment on how to set it up. A PMR is the best way to proceed.
But I did find it curious that the context is being got in sandbox but not in a report. Now jobs(including report jobs) are run in a scheduler while sandbox is run in the appserver. If the code is correct in the report, then a null pointer suggest some of the classes are not being recognized by the scheduler which usually means classpath is not set correctly. This also explains why sandbox works because the appserver uses different classpath.
So my suggestion is to check whether the classpath is the same on both.
1. Go to $TOP/bin and "source compat.sh" or run it as ". ./compat.sh". if the file is missing, then run $TOP/bin/configureEnv.sh to create it.
2. Use the following command to find the classpath used by scheduler: "echo $CCD_CLASSPATH".
1. Log into the WAS Admin console and open the server that is running MDMCS.
2. Go to "Java and Process Management" > "Process Definition" > "Java Virtual Machine" and look up the path.
If the path of the scheduler and AppServer are not the same, then we know why the report is not working. Just add those jars into the classpath as is defined in the $TOP/bin/conf/classpath directory.
Re: Communicating with JMS not working2012-11-21T08:34:15Z in response to SystemAdminIt was something about Bootstrap not found. Guess I used the wrong portnumber.
When the queues were not configured correctly it said part of the connectionfactory was not found. I guess that was also because of the context being wrong.
We ran the code in sandbox, report and action and all is working fine.