Hi,
Java Messaging Service is an API that provides reliable, asynchronous communication between applications in a distributed computing environment. It enables a Java applications that share a messaging system to exchange messages and Simplifies application development by providing a standard interface for creating, sending, and receiving messages.
To Know about JMS Topic Please refer to: Basic JMS Demo using WebLogic Topic
What are major components of JMS system?
A). JMSServer: JMS server is an environment-related configuration entity that acts as management container for JMS queue and topic resources defined within JMS modules that are targeted to specific that JMS server.
B). JMS Modules: JMS modules contain configuration resources, such as standalone queue and topic destinations, distributed destinations, and connection factories. In WebLogic Server these Configurations can be seen inside “<DOMAIN_HOME>/config/jms” Directory.
C). JMS Client: A JMS is a JMS applications that either produce messages to destinations or consume messages from destinations.
D). JNDI : Java Naming And Directory interface,It is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name.
E). Persistent Store: It can be a UserDefined Persistent Store or a Default Persistent store. It is used for storing the Data (Messages).
Here we are going to see how we can configure WebLogic JMS Server, JMS Modules (Queue/ConnectionFactory) how to Target them and then How to test it using a Simpel Java Programs.
Step1). Start your WebLogic Server an Login to the AdminConsole.
Step2). Create a JMS Server…
Step3). Configuring JMS Module:
Step4). Creating Connection Factory:
Step5).Creating JMS Queue:
Step6). Now Write a Simple Java Program to send the Messages to this JMS Queue…like following:
“QueueSend.java”
import java.io.*; import java.util.Hashtable; import javax.jms.JMSException; import javax.jms.Queue; import javax.jms.QueueConnection; import javax.jms.QueueConnectionFactory; import javax.jms.QueueSender; import javax.jms.QueueSession; import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; public class QueueSend { public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory"; public final static String JMS_FACTORY="QCF"; public final static String QUEUE="TestQ"; private QueueConnectionFactory qconFactory; private QueueConnection qcon; private QueueSession qsession; private QueueSender qsender; private Queue queue; private TextMessage msg; public void init(Context ctx, String queueName) throws NamingException, JMSException { qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY); qcon = qconFactory.createQueueConnection(); qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); queue = (Queue) ctx.lookup(queueName); qsender = qsession.createSender(queue); msg = qsession.createTextMessage(); qcon.start(); } public void send(String message) throws JMSException { msg.setText(message); qsender.send(msg); } public void close() throws JMSException { qsender.close(); qsession.close(); qcon.close(); } public static void main(String[] args) throws Exception { if (args.length != 1) { System.out.println("Usage: java QueueSend WebLogicURL"); return; } InitialContext ic = getInitialContext(args[0]); QueueSend qs = new QueueSend(); qs.init(ic, QUEUE); readAndSend(qs); qs.close(); } private static void readAndSend(QueueSend qs) throws IOException, JMSException { String line="Test Message Body with counter = "; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); boolean readFlag=true; System.out.println("ntStart Sending Messages (Enter QUIT to Stop):n"); while(readFlag) { System.out.print("<Msg_Sender> "); String msg=br.readLine(); if(msg.equals("QUIT") || msg.equals("quit")) { qs.send(msg); System.exit(0); } qs.send(msg); System.out.println(); } br.close(); } private static InitialContext getInitialContext(String url) throws NamingException { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY); env.put(Context.PROVIDER_URL, url); return new InitialContext(env); } }
Step7). Now run the “setWLSEnv.cmd” and then compile and Run the QueueSend program.
java QueueSend t3://localhost:7001
Step8). Now Login to AdminConsole to check that the Message is arrived in the JMS Queue or Not?
home—> Services–> Messaging–> JMS Modules–> MySystemModule–>MyQueue–> Monitoring–> MySystemModule –> MyQueue (Check the CheckBox)–> Show Messages(Click This Button)
Step9). Now write the following “QueueReceive.java” program to read JMS Messages from the JMS Queue.
“QueueReceive.java”
import java.util.Hashtable; import javax.jms.*; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; public class QueueReceive implements MessageListener { public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory"; public final static String JMS_FACTORY="QCF"; public final static String QUEUE="TestQ"; private QueueConnectionFactory qconFactory; private QueueConnection qcon; private QueueSession qsession; private QueueReceiver qreceiver; private Queue queue; private boolean quit = false; public void onMessage(Message msg) { try { String msgText; if (msg instanceof TextMessage) { msgText = ((TextMessage)msg).getText(); } else { msgText = msg.toString(); } System.out.println("nt<Msg_Receiver> "+ msgText ); if (msgText.equalsIgnoreCase("quit")) { synchronized(this) { quit = true; this.notifyAll(); // Notify main thread to quit } } } catch (JMSException jmse) { jmse.printStackTrace(); } } public void init(Context ctx, String queueName) throws NamingException, JMSException { qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY); qcon = qconFactory.createQueueConnection(); qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); queue = (Queue) ctx.lookup(queueName); qreceiver = qsession.createReceiver(queue); qreceiver.setMessageListener(this); qcon.start(); } public void close()throws JMSException { qreceiver.close(); qsession.close(); qcon.close(); } public static void main(String[] args) throws Exception { if (args.length != 1) { System.out.println("Usage: java QueueReceive WebLogicURL"); return; } InitialContext ic = getInitialContext(args[0]); QueueReceive qr = new QueueReceive(); qr.init(ic, QUEUE); System.out.println("JMS Ready To Receive Messages (To quit, send a "quit" message from QueueSender.class)."); // Wait until a "quit" message has been received. synchronized(qr) { while (! qr.quit) { try { qr.wait(); } catch (InterruptedException ie) {} } } qr.close(); } private static InitialContext getInitialContext(String url) throws NamingException { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY); env.put(Context.PROVIDER_URL, url); return new InitialContext(env); } }
Step10). Now compile and run the QueueRecieve.java program to read the messages from WebLogic JMS Queue.
java QueueReceive t3://localhost:7001
.
.
Thanks
Jay SenSharma
November 21st, 2010 on 6:04 pm
Hi Jay,
This is a good example to understand the concept of Q.
I have a question over persistent store. We are defining the file store.Thus all the messages are getting written to this file also.
When we run the Queue receive code it read the data from Q and shows us.
1) Then when will the data from the file store will get delete?? As this file grow over a period
2)one more thing whenever the Queue receive code executed again it will read all the data as the data persist in the file store. This is something which should not happen ? Right ?
Thanks
Sumit
November 21st, 2010 on 9:32 pm
Hi Sumit,
1) Then when will the data from the file store will get delete?? As this file grow over a period
– Its true that once the message is stored in a file store the size does not get reduced when the messages get consumed. However when the messages get consumed the messages get deleted and but size of the file does not reduces, but the same space is been used again once new messages are store in the files as re-usebilty of the space.
Example:
If 5 messages are stored in a file store with the size 1 MB each, then the file store size would 5 MB and when the messages are consumed then the messages are deleted but the file size remains 5 MB. Now if 6 more messages arrived with the size 1 MB each,then the file size would be 6 MB and not 11 MB as it will re-use the 5 MB and add only 1 MB for the 6th message.
2)one more thing whenever the Queue receive code executed again it will read all the data as the data persist in the file store. This is something which should not happen ? Right ?
– No, this is the working as it should be, by the way Why do you think its not right to consume all the messages in the file store once the consumer is up.
Hope above information would help
Regards,
Ravish Mody
November 21st, 2010 on 10:17 pm
Ravish,
1) I executed the above code. The send Q sends the message and receive Q , receives that message. This is correct and messaged gets store in file store.
2) Now , i stop all the java processes and execute the above program again.
This time as soon as i send some message from send Q , then receive Q , gets the message which is send now as well as which were sent in first time ( one which were store . This is my concern. The o/p of receive Q should not show all the store messages . Right ??
Thanks
Sumit
November 21st, 2010 on 11:02 pm
Hi Sumit,
Yes, if once the messages are consumed then the same messages should not be recived as you are saying.
It seems that in your case the messages are not getting deleted once they are consumed. I just tested the same code displaced above and its is working fine for me.
Regards,
Ravish Mody
November 28th, 2010 on 8:56 pm
Ravish,
In our setup , we are using 4 Q’s for different work and configuration for all the Q’s are default i.e the messages are getting stored in default persistent store.
What i am observing that these “.dat” are getting wrap around and presently we are having 4 “.dat” files each of size 2GB.
1) Is the wrap around behavior is a normal behavior.As this is the first time i am seeing this.
2) As we are now having lot of data to read from Q. The servers are becoming slow.How can we overcome from this?
3)Is there any way that we can control the number of messages so that the size of these “.dat” file does not grow. I am mean does WL provide some kind of overload control configuration.
4) Can we read the content of the “.dat” file so that we can analyze why suddenly this much traffic comes to servers.
For a time being to keep server running we have deleted these “.dat” files from default store location and started the servers.We know that we have lost all the messages.
Thanks
Sumit
November 29th, 2010 on 9:27 pm
Hi Sumit,
You can restrict the flow of incoming messages by applying the “Threshold” and “Quota”. This would help in your case so do have a look at the below link
Link: Configure JMS server thresholds and quota
As sometimes if the consumers are not consuming the messages as fast as the producers are sending them, then the messages would keep on piling up.
About reading the content of the “.dat” file can only be done by the WLS engineering team and that too its not garneted.
Regards,
Ravish Mody
November 30th, 2010 on 7:33 pm
Ravish,
This is something i got from weblogic document to read the contents of reading the “.dat” file. Here is the snippet to use this utility.It may be useful stuff.
java weblogic.store.Admin
storeadmin-> list -dir .
> storeadmin-> list -dir .
> storeadmin-> openfile -store myfilestore -dir .
> storeadmin-> dump -store myfilestore -conn -deep -out d:tmpfilestore1-out
> storeadmin-> close -store myfilestore
This will generate the xml file.
Thanks
Sumit
November 30th, 2010 on 8:26 pm
Hi Sumit,
Yes, by doing this steps you can generate an xml dump file which has to be given to the WLS engineering team to get the data out of it.
Search for topic:Dumping the Contents of a File Store
http://download.oracle.com/docs/cd/E13222_01/wls/docs103/config_wls/store.html#wp1149755
However if you have a look at it you would not understand anything from it, only the engineering team can do that.
Regards,
Ravish Mody
December 18th, 2010 on 3:56 am
HI Ravish,Sumit,
Can you please let me know the location from were to run the above code snippet
December 18th, 2010 on 9:45 am
Hi Ritu,
The program mentioned in the above link (http://middlewaremagic.com/weblogic/?p=1987) can be executed from any box present inside our network from any directory. Just we need to make sure that we execute the “. ./setWLSEnv.sh” script to set the CLASSPATH & PATH before compiling and running the Program.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
March 15th, 2011 on 2:48 am
Jay and Ravish
This is Great example for beginners. I appreciate your hard work and dedication for sharing this information. If you would like me to share some information related to Web Logic Portal I am happy to provide some examples and my experience . I worked with BEA Web Logic Portal Support Team in Denver CO in 2007-2008.It is great experience for me when I looked in to this middle ware magic explaining in depth details of Web Logic Users .
Thanks
Surender
March 15th, 2011 on 10:21 am
Hi Surender,
Thank for your appreciation and interest in Middleware Magic. It’s a platform which provides us an opportunity to share our findings and experiences with others. It will be great for us to have your articles published on Middleware Magic. We have a page describing all the details regarding the procedure and the steps we need to follow in order to have published our Articles on Middleware Magic and to become a part of Magic Team.
Please refer to the below Page:
http://middlewaremagic.com/weblogic/?page_id=5040
http://middlewaremagic.com/weblogic/wp-admin/images/magic/Middleware_Magic.pdf
Ragards
Ravish Mody
March 27th, 2011 on 4:08 am
Do we need to run any SQL script if we need to create a Database store instead of the file store ?
Regards
Ranadeep
March 27th, 2011 on 12:31 pm
Hi Ranadeep,
Welcome to Middleware Magic.
No its not hard and fast rule that you have to run a SQL script if you are creating a JDBC store, WLS creates a default table by it self if you have not used any DDL file to create a JDBC store.
To get more information you can go through the below link:
Topic: Automatically Creating a JDBC Store Table Using Default and Custom DDL Files
Regards,
Ravish Mody
March 29th, 2011 on 4:52 pm
Many Thanks Ravish.
I went through the documentation and found out how the table is created.
Thanks again for your quick response.
May 2nd, 2012 on 2:23 am
Hi Evryone
I am a beginner in weblogic and studying myself and i luckily found this site which i can say is a very best for me. The thing is i was trying above JMS configuration and i found an error doing a step 5 (configuring a queue and deploying in JMS server. the error is as follows in admin console
Messages
An error occurred during activation of changes, please see the log for details.
ERROR: Unable to add destination MySystemModule!MyTestQueue to the back end MyJMSServer
[JMSExceptions:045050]A destination of name MySystemModule!MyTestQueue has a jms-create-destination-identifier of name MySystemModule!MyTestQueue. However, another destination of name MySystemModule!MyTestQueue has the same jms-create-destination-identifier. Two destinations with the same jms-create-destination-identifier cannot be co-located on the JMSServer named MyJMSServer.
May 2nd, 2012 on 10:24 pm
hi everyone … i m a newbie …the above mentioned error is gone once i reinstalled a did it from beginning but i m struck in step 7 how to compile and run the programm bit confused can anyone help me out of this
thnkyou
June 19th, 2012 on 8:34 pm
hello team,
help me getting some more info in the queue/topic, in our queue i see 8 consumers. Not sure where the consumers are defined. Do we define somewhere in console or weblogic side, problem am seeing is once the JMS service process any messages, we are seeing hogging threads and that hogging thread count matches the number of consumers defined in the queue. Help me in fixing this problem.
Thanks.
June 25th, 2012 on 7:09 pm
Why doesn’t these sender and reciever program require credentials ? Isn’t this sort of a security loop hole.
If not, please explain why.
Thank you for your help !!
August 9th, 2012 on 3:52 pm
Hi Jay,
i am new to weblogic and am prepairing for the interviews pls send faqs. help me to get the job.
Regards,
chandra
September 15th, 2012 on 2:50 am
Hi ,
I set up the JMS Server , Module Sucefully .But when i tried to run the
“java QueueReceive t3://localhost:7001”
Program , it gives me below error :-
[oracle@myweblogic ss]$ java QueueSend t3://192.168.56.101:7001
Exception in thread “Main Thread” java.lang.NoClassDefFoundError: QueueSend
Could not find the main class: QueueSend. Program will exit.
Any idea how to get rid of this error .I understand this is related to ClassPath but not sure which Class i have missed.Here is my ClassPath Setting :-
[oracle@myweblogic ss]$ echo $CLASSPATH
/u01/app/oracle/Middleware/patch_wls1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/app/oracle/Middleware/patch_oepe1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/app/oracle/Middleware/jrockit_160_14_R27.6.5-32/lib/tools.jar:/u01/app/oracle/Middleware/utils/config/10.3/config-launch.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/u01/app/oracle/Middleware/modules/features/weblogic.server.modules_10.3.2.0.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/u01/app/oracle/Middleware/modules/org.apache.ant_1.7.0/lib/ant-all.jar:/u01/app/oracle/Middleware/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:/u01/app/oracle/Middleware/wlserver_10.3/common/eval/pointbase/lib/pbclient57.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar:/u01/app/oracle/Middleware/wlserver_10.3/common/eval/pointbase/lib/pbclient57.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/wlthint3client.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/wljmsclient.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/wlclient.jar:/u01/app/oracle/Middleware/patch_wls1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/app/oracle/Middleware/patch_oepe1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/jrockit-jdk1.6.0_24-R28.1.3-4.0.1/lib/tools.jar:/u01/app/oracle/Middleware/utils/config/10.3/config-launch.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/u01/app/oracle/Middleware/modules/features/weblogic.server.modules_10.3.2.0.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/u01/app/oracle/Middleware/modules/org.apache.ant_1.7.0/lib/ant-all.jar:/u01/app/oracle/Middleware/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:/u01/app/oracle/Middleware/wlserver_10.3/common/eval/pointbase/lib/pbclient57.jar:/u01/app/oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar
Please let me know about this .Thanks in Advance .
Thanks
Sahil Soni
September 17th, 2012 on 8:52 pm
Hi Rene,
Thanks for reply .It worked .
Thanks
November 6th, 2012 on 3:13 am
Hi,
Can you please advise the scripts to create queues with connection factory settings and topics.
Thanks,
Shravan.
November 6th, 2012 on 11:00 pm
I have written the following script but it is throwing the error:
from java.io import File
from java.io import FileInputStream
from java.util import Properties
inStream = FileInputStream(‘c:/oracle/wlst/propertyfiles/queuenew.properties’)
propfile = Properties()
propfile.load(inStream)
keys = propfile.keySet()
JMSmodulename=propfile.getProperty(‘JMSmodulename’)
queuename=propfile.getProperty(‘queuename’)
JNDIName=propfile.getProperty(‘JNDIName’)
connect(‘weblogic’,wlspswd);
edit()
startEdit()
print ‘CREATE JMS QUEUE: test QUEUE’;
cd(‘/’)
cmo.createJMSSystemResource(queuename)
cd(‘/JMSSystemResources/’+JMSmodulename+’/JMSResource/’+JMSmodulename)
cmo.setName(queuename)
cd(‘/JMSSystemResources/’+JMSmodulename+’/JMSResource/’+JMSmodulename+’/Queues/’+queuename)
set(‘JNDINames’,jarray.array([String(jndiname)], String))
activate()
ERROR:
Problem invoking WLST – Traceback (innermost last):
File “c:Oraclewlstscriptscreatequeuenew.py”, line 40, in ?
AttributeError: setName
it is not setting the queue name
November 9th, 2012 on 1:02 am
Thanks Van.
May 31st, 2013 on 2:21 pm
This works wonderfully – Thanks!
Please advise if you know how one may go about replacing ibm proprietary MQQueueManager (& others) with jms/weblogic alternatives?
June 18th, 2013 on 10:39 pm
I am using weblogic 10.3.4 and eclipse with plugins for weblogic, webblogic_lib use the plugin, configured the weblogic as mandated by the tutorial. Appears this error:
Exception in thread “main” weblogic.jms.common.JMSException: [JMSClientExceptions:055053]Error creating connection to the server: java.rmi.MarshalException: failed to marshal connectionCreateRequest(Lweblogic.jms.frontend.FEConnectionCreateRequest;); nested exception is:
java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.lang.NullPointerException
at weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(JMSConnectionFactory.java:258)
at weblogic.jms.client.JMSConnectionFactory.createConnectionInternal(JMSConnectionFactory.java:285)
at weblogic.jms.client.JMSConnectionFactory.createQueueConnection(JMSConnectionFactory.java:165)
at teste1.QueueSend.init(QueueSend.java:38)
at teste1.QueueSend.main(QueueSend.java:60)
Caused by: java.rmi.MarshalException: failed to marshal connectionCreateRequest(Lweblogic.jms.frontend.FEConnectionCreateRequest;); nested exception is:
java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.lang.NullPointerException
at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:92)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:342)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jms.frontend.FEConnectionFactoryImpl_1034_WLStub.connectionCreateRequest(Unknown Source)
at weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(JMSConnectionFactory.java:224)
… 4 more
Caused by: java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.lang.NullPointerException
at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:114)
at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceSmartStubInfo(RemoteObjectReplacer.java:114)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:100)
at weblogic.rmi.utils.io.InteropObjectReplacer.replaceObject(InteropObjectReplacer.java:62)
at weblogic.utils.io.ChunkedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:40)
at weblogic.utils.io.ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:141)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1124)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at weblogic.messaging.dispatcher.DispatcherWrapper.writeExternal(DispatcherWrapper.java:156)
at weblogic.jms.frontend.FEConnectionCreateRequest.writeExternal(FEConnectionCreateRequest.java:98)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:618)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObjectWL(MsgAbbrevOutputStream.java:609)
at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:38)
at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:88)
… 8 more
Caused by: java.lang.NullPointerException
at weblogic.rmi.internal.BasicRuntimeDescriptor.createSkeletonClass(BasicRuntimeDescriptor.java:271)
at weblogic.rmi.internal.BasicRuntimeDescriptor.(BasicRuntimeDescriptor.java:157)
at weblogic.rmi.internal.BasicRuntimeDescriptor.(BasicRuntimeDescriptor.java:139)
at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:106)
… 30 more
June 24th, 2013 on 7:35 pm
Thank you, it worked
October 4th, 2015 on 9:17 pm
I am trying to test messages coming in to JMS Queue.Whenever i send a message,messages total column gets updated and Message current remains 0.
When i bring down the Listener and send messages,Message Current column count increases along with Message total while Message Pending remains 0.
Can you please help me understand the below scenarios: 1)When messages are sent,shouldn’t message current column show the count? should only messages total count increase?
2)when listener is down,shouldn’t the message pending column increase and not messages current?
This seems like a bug to me,Can you please help me?
Also can you please suggest any other positive or negative scenarios that can be tested on JMS Queue? Thanks.
October 4th, 2015 on 10:09 pm
Hello Sudeep,
Can you please let us know which version of WebLogic are you using?
I just tested quickly and i see that things seems to be working fine ( I tested on WebLogic 12c). The behavior you are noticing seems to be normal and expected to me when the listener is ON.
Messages Current: The current number of messages stored on this JMS server. This number does not include the pending messages.
Messages Pending: The current number of messages pending (unacknowledged or uncommitted) stored on this JMS server. Pending messages are over and above the current number of messages.
Try the following to understand this behavior, Put some sleep inside your Message Listener (see below i am putting 60 seconds sleep) while processing a message. Example:
Pending messages are those messages which are unacknowledged or uncommitted, but those are still being processed to be acknowledged or committed.
Please correct me if my understanding regarding your issue is not correct.
Regards
Jay SenSharma
June 10th, 2018 on 12:45 am
Hi,
I’m new to JMS. So that i completed all the steps for setting weblogic environment setup. I wrote QueueSend.java class by creating simple java project in Eclipse IDE.
I want to know about how to apply/perform step-7
i.e
Step7). Now run the “setWLSEnv.cmd” and then compile and Run the QueueSend program.
java QueueSend t3://localhost:7001
I’m confused about how and from where to run “setWLSEnv.cmd” this command.
Please someone help me to perform step-7.
Thanks in advance