Jms help
hai friends,
can anyone send one example application on JMS, and source code.tell me how to compile and run the application.
thanking u ..
bye
hai friends,
can anyone send one example application on JMS, and
source code.google is willing to help.
tell me how to compile and run the
application.that's not gonna happen unless you read about JMS, and ask specific questions where you are having trouble with.
thanking u ..
byeyour welcome.
=)
Similar Messages
-
Hi,
I have set up a topic Queue and QueueConnectionFactory in the jms.xml file that is present under the oc4j-config directory, but they fail to show up in the JNDI tree when I run under JDeveloper (9.052). As a result I cannot actually use the MDBs in my application nor can I send messages to the Queue.
But it works to some degree because without those entries mapping the destination in the orion-ejb-jar.xml file for the MDBs, it will not deploy.
So does anyone know how to fix this? Or is this like most Oracle problems (i.e. ORACLE isn't very good at J2EE)? Help!I did manage to find out how to setup the application-client.xml and orion-application-client.xml files, but those entries still do not show up in the JNDI tree.
And, as usual, I post here as a last ditch attempt and I doubt I will get any responses. Grrr... -
JMS, Help needed in writing a client code with .bindings file
Some one is keeping a message in MQSeries in their environment. We need to develop a client code, probably a JMSClient, which will consume the messages from the MQSeries. They have given us a ".bindings" file. The following lines of code is used and we are not able to connect to it. Can somebody help us in completing this task?
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:///c:/Temp");
String QCF = "CPS.ECOMM.QCF";
String TEST_QUEUE_S = "SYSTEM.JMS.D.CPSI.ECOMM";
initialContext = new InitialContext(env);
queueConnectionFactory = (QueueConnectionFactory)initialContext.lookup(QCF);
queueConnection = queueConnectionFactory.createQueueConnection();
queueConnection.start();
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = (Queue)initialContext.lookup(TEST_QUEUE_S);
QueueReceiver receiver = queueSession.createReceiver(queue);
Message msg = receiver.receive();
TextMessage txtMsg = (TextMessage)msg;
String result1 = txtMsg.getText();
....The .bindings file is part of the structure expected by the RefFSContextFactory in the directory that provider.utl points to.
Create a directory containing only the .bindings file and point the PROVIDER_URL at the directory. -
JMSClientExceptions:055053 -WebLogic10 Cluster - Remote WebLogic JMS - Help
All,
We are using a foreign JMS provider from WeLogic 10 cluster to connect to the Remote WebLogic JMS Server. We are getting below error while posting the data to the queue. Any help , ideas as to why this is occuring please?
/ Error
Error during connection/session creation:weblogic.jms.common.JMSException: [*JMSClientExceptions:055053*]Error creating connection to the server: java.rmi.UnmarshalException: failed to unmarshal class weblogic.jms.client.JMSConnection; nested exception is: java.io.StreamCorruptedException|portal
Thanks a lot for your help.All
The issue popped up gain. Below is the full stack trace. I confirmed that we are using the t3 URL to connect to remote JMS server (which is Weblogic 10 /JMS). Appreciate any insights help to resolve this issue.
// Stack Trace
weblogic.jms.common.JMSException: [JMSClientExceptions:055053]Error creating connection to the server: java.rmi.UnmarshalException:
failed to unmarshal class weblogic.jms.client.JMSConnection; nested exception is:
java.io.StreamCorruptedException
at weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(JMSConnectionFactory.java:253)
at weblogic.jms.client.JMSConnectionFactory.createConnectionInternal(JMSConnectionFactory.java:285)
at weblogic.jms.client.JMSConnectionFactory.createQueueConnection(JMSConnectionFactory.java:165)
at com.juniper.core.mdb.MessageSender.initSession(MessageSender.java:79)
at com.juniper.core.mdb.MessageSender.<init>(MessageSender.java:64)
at com.juniper.core.mdb.MDBHelper.processMessage(MDBHelper.java:98)
at com.juniper.core.mdb.BaseMDB.onMessage(BaseMDB.java:35)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:3964)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.rmi.UnmarshalException: failed to unmarshal class weblogic.jms.client.JMSConnection; nested exception is:
java.io.StreamCorruptedException
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:229)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at weblogic.jms.frontend.FEConnectionFactoryImpl_1001_WLStub.connectionCreate(Unknown Source)
at weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(JMSConnectionFactory.java:244)
... 15 more
Caused by: java.io.StreamCorruptedException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1332)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:227)
... 19 more
Thanks
Edited by: user3285437 on May 4, 2009 9:26 AM -
Distributed JMS help using topic - can it do this?
Using Weblogic 10.0, what is the a suggested configuration for having 2 apps in a cluster, where one creates messages in a distributed topic and another (a servlet) reads those messages? Messages need to be acknowleged and removed once read regardless of which managed server the user is on.
Currently, I have a cluster of managed servers with a Uniform Distributed Topic, and I need a user to read a message just once regardless of which managed server he uses.
I have 2 Ears - one creates messages, and another is a servlet that allows a user to read a message.
My reader has a listener that subscribes on startup - like this:
tconFactory.createTopicConnection(...);
connection.createTopicSession(...)
session.createSubscriber (...)
It does a readNoWait() if a user clicks on a button. Another app puts messages in the topic.
I want the user to read the message once (any only once) regardless of which managed server he is on.
The way it is working is that if a user switches from one managed server to another he sees old messages he already read.
Also, I tried using the module!queuename JNDI name but I get an exception. I have to just use the "regular" topic name.
Any help appreciated!
thanks in advance
Edited by dantill at 05/16/2008 8:12 AMSo in a clustered environment, if a user is reading (and acknowledging) messages from a topic and that user is "load balanced" to another managed server on the cluster, he will see messages he already acknowledged? No - things don't work this way, unless the user is attaching to two different durable subscriptions. You may want to pick up a book on JMS, or study up on the Sun tutorials, and pay special attention to the difference between queues and topics, and the difference between "non-durable" and "durable" topic subscribers. It would likely help if you firmed up on these concepts before diving into the concept of distributed topics.
The key points of WL distributed topics are:
(1) Durable subscription can only be formed directly on a member (they can't move from member to member!), you can't specify the distributed topic JNDI name when creating a durable subscription - only the member JNDI name.
(2) Non-durable subscriptions can specify the distributed topic JNDI name.
(3) Just as with a non-distributed topic, every message that is sent to the distributed topic or that is sent directly to particular member is in turn delivered to every subscribers on every members.
>>>> About Migratable targets - it may have been this statement:
"A migratable target is a special target that can serve as a grouping of JMS services and which is active on only server member in a cluster."
All this means is that multiple JMS services (such as JMS servers) can all target to the same MT. When the MT is migrated from one WL server to another, all related JMS servers are migrated.
PS. Given my limited knowledge of your use case, it seems like you're looking for a distributed queue (not a topic), with a single consumer that can switch between one of two servers. Or perhaps one consumer on each server. In addition, in order to avoid "abandoning" messages on a particular queue member without consumers, there's a configurable option to have the idle member automatically forward its messages to a queue member that actually has consumers (queue forwarding option).
Hope this helps,
Tom -
Hello,
We have a requirement to get a JMS/MDB solution working on our servers. Basically, we have one server running a JMS topic that several other servers with MDBs listen on. This much we were able to get working with help of some OTN people. Thanks!
Two problems still remain. One, We won't go to 904 until 904 is in production. Plus, the upgrade testing and such may delay the upgrade to 904 past its release date. We only need a memory based non persistent solution, thus using AQ would be overkill. So we are simply using the 903 memory based JMS implementation.
Secondly, and more importantly, the only way we seem to be able to get a Topic Connection factory is by using the admin/password id that you establish when you first install OC4J.
Any pointers on how I can change this so I am not deploying the server's admin id and password? I am not very well versed in the security aspects of this server. Alot of people seem to be. What resources should I look at?
Thank you for your help
Mattthank you for the information.
So does that mean there is no way to set the extended form rights and the signature rights? Or is there something I can do to change the rights on the pdf?
thanks again
Nick -
New to JBoss/JMS: Help to get started
Hi,
I'm a J2EE programmer (and have been one for a while) but have never used JBoss or JMS, and need to know how JMS works in JMS, how to setup queues, monitor them (perhaps using HermesJMS), etc. I use Eclipse (new to me as well), so would like to know if I need to install the JBoss Eclipse IDE plugin, or if I could do all of this without that.
Also, to get started and understand some existing code that uses this already, what would be a quick way. Skimmed through some references but dont have much time for a steep learning curve. Thanks.
We use Tomcat (and jBPM within it) and JBoss for JMS.Hi
I would also like to add,
- I aware that all the configuration files are available under deploy/jms folder.
- jbossMQ-service.xml and uil2-service.xml files have great role to do while creating queues and creating ConnectionFactory, respectively.
But I am not able to relate all the things and not able to start with a small example, even I am not able to define QueueConnectionFactory.
I am getting error like,
Exception in thread "main" javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)
at SendRecvClient.setupPTP(SendRecvClient.java:61)
at SendRecvClient.sendRecvAsync(SendRecvClient.java:76)
at SendRecvClient.main(SendRecvClient.java:107)
Caused by: java.lang.ClassNotFoundException: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
... 5 more
So Any startup small application along with configuration details is highly appriciated.
Regards,
Maulik -
Weblogic Server 9.2 Crashes when using the JMS Wrapped Connection Pooling.
===== BEGIN DUMP =============================================================
JRockit dump produced after 0 days, 01:05:05 on Thu Sep 16 18:27:36 2010
Additional information is available in:
E:\obopay\servers\EWP_9.2_Domain\jrockit.4516.dump
E:\obopay\servers\EWP_9.2_Domain\jrockit.4516.mdmp
If you see this dump, please open a support case with BEA and
supply as much information as you can on your system setup and
the program you were running. You can also search for solutions
to your problem at http://forums.bea.com in
the forum jrockit.developer.interest.general.
Error Message: Illegal memory access. [54]
Exception Rec: EXCEPTION_ACCESS_VIOLATION (c0000005) at 0x0095065F - memory at 0x00740060 could not be read.
Minidump : Wrote mdmp. Size is 567MB
SafeDllMode : -1
Version : BEA JRockit(R) R27.2.0-131-78843-1.5.0_10-20070320-1457-windows-ia32
GC Mode : Garbage collection optimized for throughput
GC Strategy : Generational Parallel Mark & Sweep
: Current OC phase is: not running. YC is not running.
: GC strategy for GC 36 was genparpar
: GC strategy for GC 37 was genparpar
: GC strategy for GC 38 was genparpar
: GC strategy for GC 39 was genparpar
: GC strategy for GC 40 was genparpar
: mmHeap->data = 0x00C00000, mmHeap->top = 0x10C00000
: The nurserylist starts at 0x01BE75E8 and ends at 0x0CB52440
: mmStartCompaction = 0x00C00000, mmEndCompaction = 0x01C00000
: References are 32-bit.
CPU : Intel Pentium III/Pentium III Xeon SSE SSE2 SSE3 SSSE3 EM64T
Number CPUs : 2
Tot Phys Mem : 3451408384 (3291 MB)
OS version : Microsoft Windows XP version 5.1 Service Pack 3 (Build 2600) (32-bit)
Thread System: Windows Threads
State : JVM is running
Command Line : -Djava.library.path=E:\bea\jrockit90_150_10\bin;E:\bea\jrockit90_150_10\jre\bin;E:\bea\weblogic92\server\native\win\32;E:\bea\weblogic92\server\bin;E:\bea\weblogic92\server\native\win\32\oci920_8 -Dweblogic.management.discover=false -Dplatform.home=E:\bea\weblogic92 -Dwls.home=E:\bea\weblogic92\server -Dwli.home=E:\bea\weblogic92\integration -Dweblogic.Name=myserver -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic -Dweblogic.ext.dirs=E:\bea\patch_weblogic901\profiles\default\sys_manifest_classpath\weblogic_patch.jar Djava.security.auth.login.config=E://workspace/Bhopal/LoginModulesConfig/ewp_loginmodules.config -Djava.naming.factory.initial.ewp.remote=weblogic.jndi.WLInitialContextFactory -Dcom.ewp.proxy.is_remote=false -Djava.naming.provider.url.ewp.remote=t3://localhost:7001 -Dweblogic.webservice.verbose=true -Dweblogic.log.Log4jLoggingEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=true Xdebug -Xnoagent -Dcom.sun.management.jmxremote -Xms256m -Xmx1024m -Dsun.java.launcher=SUN_STANDARD weblogic.Server
java.home : E:\bea\jrockit90_150_10\jre
JAVA_HOME : <not set>
JAVAOPTIONS: <not set>
PATH : E:\bea\jrockit90_150_10\jre\bin;E:\oracle\product\10.2.0\client_1\bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\TortoiseSVN\bin
C Heap : Good; no memory allocations have failed
StackOverFlow: 0 StackOverFlowErrors have occured
OutOfMemory : 0 OutOfMemoryErrors have occured
Registers (from ThreadContext: 0x4B29E378 / OS context: 0x4B29E764):
eax = 00740060 ecx = 00740060 edx = 45a45ba0 ebx = 08c953b8
esp = 4b29ea30 ebp = 00000000 esi = 4b29ea60 edi = 4b29efb4
es = 00000023 cs = 0000001b ss = 00000023 ds = 00000023
fs = 0000003b gs = 00000000
eip = 0095065f eflags = 00010206
Stack:
(* marks the word pointed to by the stack pointer)
4b29ea30: 00981099* 08c953b8 008ab310 4b29eb34 09e5c308 009810ea
4b29ea48: 4b29ead8 0098ecd2 4b29ea60 4b29ea90 48bd8960 48bd8960
4b29ea60: 00000001 45aa0278 45a45ba0 00000007 00000000 08c953b8
4b29ea78: 08512180 4b29ef60 00000000 09d56368 09d563b0 4b29efb4
Code:
(* marks the word pointed to by the instruction pointer)
0095062c: 5e5f0cc4 c35bc033 01b85e5f 5b000000 ccccccc3 0424448b
00950644: a5f06ca3 ccccc300 cccccccc 04244c8b 01a8018b e0830774
0095065c: 8bc88bfe* 40788301 44408b03 af0f0a75 c0830841 f8e08317
00950674: ccccccc3 cccccccc cccccccc 0424448b 00f4888b 158b0000
Loaded modules:
(* denotes the module causing the exception)
00400000-0040ffff E:\bea\jrockit90_150_10\bin\javaw.exe
7c900000-7c9b1fff C:\WINDOWS\system32\ntdll.dll
7c800000-7c8f5fff C:\WINDOWS\system32\kernel32.dll
7e410000-7e4a0fff C:\WINDOWS\system32\USER32.dll
77f10000-77f58fff C:\WINDOWS\system32\GDI32.dll
77dd0000-77e6afff C:\WINDOWS\system32\ADVAPI32.dll
77e70000-77f02fff C:\WINDOWS\system32\RPCRT4.dll
77fe0000-77ff0fff C:\WINDOWS\system32\Secur32.dll
77c10000-77c67fff C:\WINDOWS\system32\MSVCRT.dll
76390000-763acfff C:\WINDOWS\system32\IMM32.DLL
00820000-00a9cfff *E:\bea\jrockit90_150_10\jre\bin\jrockit\jvm.dll
76b40000-76b6cfff C:\WINDOWS\system32\WINMM.dll
71ab0000-71ac6fff C:\WINDOWS\system32\WS2_32.dll
71aa0000-71aa7fff C:\WINDOWS\system32\WS2HELP.dll
7c340000-7c395fff E:\bea\jrockit90_150_10\bin\MSVCR71.dll
5dac0000-5dac7fff C:\WINDOWS\system32\rdpsnd.dll
76360000-7636ffff C:\WINDOWS\system32\WINSTA.dll
5b860000-5b8b4fff C:\WINDOWS\system32\NETAPI32.dll
76bf0000-76bfafff C:\WINDOWS\system32\PSAPI.DLL
6d700000-6d70bfff E:\bea\jrockit90_150_10\jre\bin\verify.dll
6d370000-6d38cfff E:\bea\jrockit90_150_10\jre\bin\java.dll
6d2f0000-6d2f7fff E:\bea\jrockit90_150_10\jre\bin\hpi.dll
6d720000-6d72efff E:\bea\jrockit90_150_10\jre\bin\zip.dll
6d520000-6d527fff E:\bea\jrockit90_150_10\jre\bin\management.dll
6d530000-6d542fff E:\bea\jrockit90_150_10\jre\bin\net.dll
71a50000-71a8efff C:\WINDOWS\system32\mswsock.dll
662b0000-66307fff C:\WINDOWS\system32\hnetcfg.dll
71a90000-71a97fff C:\WINDOWS\System32\wshtcpip.dll
41c00000-41c26fff C:\WINDOWS\system32\DNSAPI.dll
41c30000-41c37fff C:\WINDOWS\System32\winrnr.dll
41c40000-41c6bfff C:\WINDOWS\system32\WLDAP32.dll
41c80000-41c85fff C:\WINDOWS\system32\rasadhlp.dll
68000000-68035fff C:\WINDOWS\system32\rsaenh.dll
769c0000-76a73fff C:\WINDOWS\system32\USERENV.dll
438b0000-438b8fff E:\bea\jrockit90_150_10\jre\bin\nio.dll
41ba0000-41ba9fff E:\bea\jrockit90_150_10\jre\bin\jmapi.dll
41bb0000-41bbdfff E:\bea\weblogic92\server\native\win\32\wlfileio2.dll
43ce0000-43cf8fff C:\WINDOWS\system32\iphlpapi.dll
43d10000-43d27fff C:\WINDOWS\system32\MPRAPI.dll
77cc0000-77cf1fff C:\WINDOWS\system32\ACTIVEDS.dll
43d30000-43d54fff C:\WINDOWS\system32\adsldpc.dll
43d60000-43d70fff C:\WINDOWS\system32\ATL.DLL
43d80000-43ebcfff C:\WINDOWS\system32\ole32.dll
43ec0000-43f4afff C:\WINDOWS\system32\OLEAUT32.dll
43f50000-43f5dfff C:\WINDOWS\system32\rtutils.dll
71bf0000-71c02fff C:\WINDOWS\system32\SAMLIB.dll
43f60000-44052fff C:\WINDOWS\system32\SETUPAPI.dll
44060000-44064fff E:\bea\weblogic92\server\native\win\32\wlntio.dll
44540000-44545fff E:\bea\jrockit90_150_10\jre\bin\rmi.dll
4d010000-4d122fff E:\bea\jrockit90_150_10\jre\bin\dbghelp.dll
"[STANDBY] ExecuteThread: '21' f" id=87 idx=0xf0 tid=4208 lastJavaFrame=0x4B29EB4C
Stack 0: start=0x4B260000, end=0x4B2A0000, guards=0x4B263000 (ok), forbidden=0x4B261000
Thread Stack Trace:
at _mmGetPossibleMovedObjectSize+15()@0x0095065F
at _refIterInit+393()@0x00981099
at _refIterInit+474()@0x009810EA
at _trProcessLocksForThread+66()@0x0098ECD2
at _javalockCouldBeLock+1047()@0x008AB417
at _javalockConvertThinToFat+42()@0x008AC13A
at RJNIjrockit_vm_Locks_convertThinLockedToFatLocked@8+15()@0x00986B1F
-- Java stack --
at jrockit/vm/Locks.convertThinLockedToFatLocked(Ljava/lang/Object;)V(Native Method)
at jrockit/vm/Locks.createMonitorAndConvert(Ljava/lang/Object;Z)Ljrockit/vm/ObjectMonitor;(Unknown Source)
at java/lang/Object.wait(J)V(Native Method)
at java/lang/Object.wait(Object.java:474)
at weblogic/common/CompletionRequest.getResult(CompletionRequest.java:109)
^-- Holding lock: weblogic/common/CompletionRequest@0x09E5C2A8[thin lock]
at weblogic/store/gxa/internal/GXATransactionImpl.commitStoreIO(GXATransactionImpl.java:99)
at weblogic/store/gxa/internal/GXATransactionImpl.doOperationCallbacks(GXATransactionImpl.java:215)
at weblogic/store/gxa/internal/GXAResourceImpl.commit(GXAResourceImpl.java:1448)
at weblogic/transaction/internal/XAServerResourceInfo.commit(XAServerResourceInfo.java:1333)
at weblogic/transaction/internal/XAServerResourceInfo.commit(XAServerResourceInfo.java:577)
at weblogic/transaction/internal/ServerSCInfo.startCommit(ServerSCInfo.java:514)
at weblogic/transaction/internal/ServerTransactionImpl.localCommit(ServerTransactionImpl.java:1993)
at weblogic/transaction/internal/ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2658)
at weblogic/transaction/internal/ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2580)
at weblogic/transaction/internal/ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:278)
at weblogic/transaction/internal/ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
at weblogic/deployment/jms/WrappedTransactionalSession.delistFromTransaction(WrappedTransactionalSession.java:258)
^-- Holding lock: weblogic/deployment/jms/PooledSession_weblogic_jms_client_JMSXASession@0x09D56368[thin lock]
at weblogic/deployment/jms/WrappedMessageProducer.send(WrappedMessageProducer.java:149)
at com/obopay/jms/helper/BaseQueueHelper.sendMessage(BaseQueueHelper.java:107)
The above is the jrockit crash dump file..
I am using the JMS Wrapper Connection Poooling provided by Weblogic. When i use Jmeter and do the load testing for around 10 users, the server gets crashed.
I doubt something is going wrong with the Weblogic JMS Connection Pooling, please help me..The problem doesn't look like it has anything to do with wappers per se. The stack indicates that the JVM died when the persistent store tried to invoke a standard Java synchronize operation. JVM crashes need to be analyzed by a JVM expert, so I second the suggestion to solicit help from JVM experts and/or filing a case with customer support. In the mean-time, you can probably work-around the issue by either (A) ensuring you have a recent version of the JVM installed, or (B) temporarily switching to the Sun JVM.
Regards,
tom
Edited by: TomB on Sep 17, 2010 2:33 PM -
hi,
i ned to impliment a jca (java connector architecture) in jms,
help me.
thanksHi,
You're going to need to be a bit more specific in your question.
Why do you need to write one? Most JMS providers come with JCA adapters, and Sun have two open source JCA adapters which will work with a variety of JMS providers. Take a look at
[genericjmsra.dev.java.net|http://genericjmsra.dev.java.net]
[jmsjca.dev.java.net|http://jmsjca.dev.java.net]
Nigel -
I'm new in JMS so pls excuse me if this is a silly qn.
From what I know JMS is able to push data to a subscriber but in this case my subscriber is a web-client (JSP). Is it still possible?
What I am trying to do is whenever there is any changes in the db, I want the latest info to be send to all the web client without them requesting for it. Of course if they request which will cause the page to refresh, it wouldn't be any problem. But I do not want the page to refresh.
Can JMS help me with it or does anyone has any other ideas?How can you synchronously send from a JMS MessageListener to a web client other than by using Ajax?
I don't understand what you mean by synchronous in this case. A JMS subscription is typically an asynchronous request for messages; that does not map to JSP - other than if your JSP page just keeps polling.
James
http://logicblaze.com/ -
How to implement Distributed Transactions in ADF?
Scenario:
when selected rows and submitted action from UI, following happens
1) For the selected rows, information will get fetched from database and a message will get formed and will get posted in JMS queue
2) once step1 is successful, corresponding record will get logically deleted
Implementation details:
Environment: Oracle ADF , Weblogic server
Step1: Created UI with Multi selection
Step2: getting selected row key information and calling a custom AM method (exposed as client interface) from managed bean passing selected row key info
step3: implementing following logic in AM method
while(keyList.hasNext()
1) getting View object for the given key and populating message
2) Posting the mesage in JMS queue configured in weblogic using JMS Helper classes written
3) updating the delete flag in VO
Problem statement:
In Step3 after sub step 2 executed, suppose if database is down substep3 will not get executed
because of which a record will get displayed again back in UI and when selected again a duplicated message will be sent to the concerned external system
I'm very new to ADF. Can anyone please help me on how to achieve this using ADF?
Much Appreciated,
InduThanks Vinod for your reply
at substep 2 getting record from database and populating message and posting it to jms queue
at substep 3 if post is successful the updating database indiacting this message has been sent by updating delete flag
if i update database first and then if send message, In case of JMS exception(Can be Queue failures) my record will get updated and i cannot see record back in UI
So both these opertions has to be happened in in single Transaction.Either both has to be happened or both has to be rolled back
database and JMS are different resources. How ADF handles these XA transactions?
Thanks,
indu -
Error While deploying Using JMS Listener- Environmenmt setup? Help!
I have a message driven bean (actually someone else wrote it and left no deployment procedures)
I use a resource provider and adapter
I listen to a jms queue and use a web service to send messages to a bpel process
I compile fine. The code works on other instances. Some environment variables were set that are unknown.
When I deploy to a new oc4j container, I get this error...it is baffling everyone. I really think it has some environment setup I am not thinking of. What could it be?
Someone please help!
What could this refer to? The error message is quite deceiving.
BUILD FAILED
/home/iasgcsdc/DS_028/Send/Send/build.xml:93: Deploy error: Operation
failed with error:
[GCEDC-DS-Send:ejb:SendServiceMDB] - The method init on the
interceptor class mil.usmc.gcss.SendServiceMDB (or one of its superclasses) does not exist or it does not
have the expected argument type: javax.interceptor.InvocationContext.
There is no method init being used that i know of.
The class I wrote SendServiceMDB implements MessageListener
I will post code later.
It uses a '@Resource' annotation at one point...could this be the cause.
Any help or guesses would be so much appreciated. Thanks,
JasonHi Peter,
Thanks for the reply.
The issue was with the Memory heap space allocated by Ant.
I have created an environment variable "ANT_OPTS" with the value -Xms512M -Xmx512M
and it works great.
I tried your approach as well and even that works out perfectly.
Edited by: Jaydev Doshi on Oct 23, 2009 10:43 PM -
i m new to java,,, running one simple code in JMS Topic... using weblogic.... server.. please help me as it is givng me the error.. that i have pasted below. thanx in advance
Deepali
my publisher code i m giving below :
***************************************88
import javax.naming.*;
import javax.naming.InitialContext;
import javax.jms.JMSException;
import javax.jms.Topic;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.TopicPublisher;
import javax.jms.DeliveryMode;
import javax.jms.TopicSession;
import javax.jms.TopicConnection;
import javax.jms.TopicConnectionFactory;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.*;
public class Publisher
public static void main(String[] args) throws Exception
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
// get the initial context
InitialContext ctx = new InitialContext(env);
//InitialContext ctx = getInitialContext("t3://localhost:7001");
// lookup the topic object
Topic topic = (Topic) ctx.lookup("topic0");
// lookup the topic connection factory
TopicConnectionFactory connFactory = (TopicConnectionFactory) ctx.
lookup("topic/connectionFactory");
// create a topic connection
TopicConnection topicConn = connFactory.createTopicConnection();
// create a topic session
TopicSession topicSession = topicConn.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
// create a topic publisher
TopicPublisher topicPublisher = topicSession.createPublisher(topic);
topicPublisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
// create the "Hello World" message
TextMessage message = topicSession.createTextMessage();
message.setText("Hello World");
// publish the messages
topicPublisher.publish(message);
// print what we did
System.out.println("published: " + message.getText());
// close the topic connection
topicConn.close();
it is givng following error?.. can some one explaine me y?...
Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve 'topic0' Resolved: '' Unresol
ved:'topic0' ; remaining name 'topic0'
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:263)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:230)
at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at Publisher.main(Publisher.java:33)Could you tell me how the error was resolved, I am getting same error>
Thanks
i m new to java,,, running one simple code in JMS Topic... using weblogic.... server.. please help me as it is givng me the error.. that i have pasted below. thanx in advance
Deepali
my publisher code i m giving below :
***************************************88
import javax.naming.*;
import javax.naming.InitialContext;
import javax.jms.JMSException;
import javax.jms.Topic;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.TopicPublisher;
import javax.jms.DeliveryMode;
import javax.jms.TopicSession;
import javax.jms.TopicConnection;
import javax.jms.TopicConnectionFactory;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.*;
public class Publisher
public static void main(String[] args) throws Exception
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
// get the initial context
InitialContext ctx = new InitialContext(env);
//InitialContext ctx = getInitialContext("t3://localhost:7001");
// lookup the topic object
Topic topic = (Topic) ctx.lookup("topic0");
// lookup the topic connection factory
TopicConnectionFactory connFactory = (TopicConnectionFactory) ctx.
lookup("topic/connectionFactory");
// create a topic connection
TopicConnection topicConn = connFactory.createTopicConnection();
// create a topic session
TopicSession topicSession = topicConn.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
// create a topic publisher
TopicPublisher topicPublisher = topicSession.createPublisher(topic);
topicPublisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
// create the "Hello World" message
TextMessage message = topicSession.createTextMessage();
message.setText("Hello World");
// publish the messages
topicPublisher.publish(message);
// print what we did
System.out.println("published: " + message.getText());
// close the topic connection
topicConn.close();
it is givng following error?.. can some one explaine me y?...
Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve 'topic0' Resolved: '' Unresol
ved:'topic0' ; remaining name 'topic0'
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:263)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:230)
at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at Publisher.main(Publisher.java:33) -
Need help about setting up a JMS sender channel
I just started to play with PI for a few weeks and I'm trying to setup a simple JMS sender channel to read stuff from a WebSphere MQ.
I've someone installed JMS adaptor for me, but we never know it is correctly installed or not. First question is "Is there any way we can verify JMS adapter is correctly installed or not?"
In the Design: integration builder, I've a very defined a very simple data type(src_dt) which is a string and a message type(src_mt) which uses resp_dt. Finally I created a message interface (test_mia_out) that contains src_mt. At this point of time, I don't need message mapping so I didn't configurate this section.
Then I went to Configuration: Integration builder and created a new communcation channel with the following setting:
Parameter section:
Adapter Type: JMS
Transport Protocol: WebSphereMQ (Non-JMS) <- if i don't use this option, i can't enter MQ connection detail in the Source section.
Message Protocol: JMS 1.x
Adapter Engine: Integration Server
Source section:
QueueConnectionFactory Java Class: com.ibm.mq.jms.MQQueueConnectionFactory
Queue Java Class: com.ibm.mq.jms.MQQueue
...MQ connection detail...(IP, Port, Queue Manager, Channel and Queue Name )
Transport Protocol: TCP/IP <- this is consists to server side setting
JMS-Compliant: JMS-Compliant
Since I only want a very simple working sample, again I didn't change the content in receiver determination, interface determaintion and sender agreement.
Now when I active this change and I saw the following error in the channel monitor:
Short Log - Channel has internal error
Admin Info - Exception: Channel with Status Unknown or Not Registered
I did stop and start the service, refresh CPA cache and even restart the entire PI server, I always see this message and cannot find any more detail description about what is causing this problem.
My PI Server version is 7.0 and MQ version is 5.3
There's very limited resource about how to setup to read MQ message in PI and I'm stuck now. Therefore, I need a help from some experienced people to tell me if I have did something wrong or missed some steps?
And if possible, could people mind to post a step by step go through how you setup it up?
Edited by: Robert Fu on Jan 10, 2008 6:51 AMBefore you use the JMS, you need to deploy some drivers related to specific MQseries, Kindly ensure that proper driver are deployed....
If you use MQSeries 53x.xxx, you must enter the following JAR files in aii_af_jmsproviderlib.sda.
com.ibm.mq.jar, com.ibm.mqbind.jar, com.ibm.mqjms.jar, connector.jar (use the JAR file from the J2EE client directory)
check this link it will give you more inofmration
http://help.sap.com/saphelp_nw04/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/content.htm
check this to get the condifuration the JMS
How to use conversion modules in JMS - https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
Ref How To Use the Content Conversion Module in JMS Adapter - https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377& -
Help using JMS in a network/general architecture
Hi everybody :
We are working on the development of a distributed application. The architecture of the system is something like this:
- A dispatcherthat receives requests (in a string shape) via http post. This unit has to encapsulate this request in a object and fordward such a petition to the correct service according a parameter of the request string.
- A little number of services (4 or 5) that wait for requests delivered by the dispatcher. When a petition arrives, is attended to, and a response is sent to the client, using the http post that the client has used to send us the initial request. The computation complexity could be severe (access to DB, on-demand compilations, multimedia handling...).
The distribution arises when we wanted to place each service on different machines due a heavy amount of requests.
On a first approach, we are considering to use a servlet to manage the requests and JMS as middleware messaging service, as we want to provide an efficient communication layer between the modules of our application.
Here come my doubts:
- Would be the system more efficient if the service-providers are some kind of Enterprise Java Beans? And servlets?
- I have readed the JMS and de JNDI tutorial. I have performed many tests in local mode, and i want now to do the same in a network mode... could somebody orient me? How do could i bind a connection factory with a specific resource across the network? In coding time or in deploying time?
Help will be very very appreciated!!!!!
Thank you very much for reading this message
Greetings from Maria, Spain (europe)Hello Maria,
You mention several things regarding architecture. I'll try to iterate them for you. As always this is just one persons idea/opionion.
Receive Request from HTTP Posts. (Dispatcher)
-- Sounds like an XML String morphed into an object via servlet. You could standardize on SOAP if it's not too much overhead.
Services - High computation...
Let jms receive and queue these requests. A service delegate can spawn threads to deal with the complex computations. I say Queue so you can cap the active thread count and pause the delegators thread creation due to any memory / cpu constraints...
As far as JMS is concerned I'm unaware of your transactional requirements. In enterprise systems I have written, everything must be transacted and audited. JMS has a nice model for this. You could move to a pub/sub architecture as well.
Scalability - (Distribution arises) - Each machine can maintain it's own queue and the servlets can distribute to them. Or you can pub/sub them via a dispatcher, it's own machine if desired - and let each machine act as a listener. A nice model as the amount of services grows.
- Now that I've only reiterated what you've tried..
Would be the system more efficient if the service-providers are some kind of Enterprise Java Beans? And servlets?
-In my opionion for the high volume HTTP requests, servlets can lift the load.
-You system has a high level of requests and load on your CPU. I'll also assume that transactions and auditing are required. As I'm sure you well know EJB is not the fastest animal in the forest. I would not use Message Driven Beans as you will have a hard time tunning performance within an EJB Container.
- Now after I've said all that any fallout and persistance requrements from each service can leverage EJB's. Just remember that EJB's lend themselves well to web/commerce apps. I have no idea of your applications context so I'm taking a stab. There are wonderful tools in the EJB architecture, however, just because you've chosen Java doesn't mean you have to use EJB's. If speed in an issue for these services ( persisted or session level ) perhaps a mix is what your desire. ( I find session beans to be much better accessors than there sluggish entity brothers. )
JNDI - Create a Service Locator that abstract the lookups for your services. Depending on how far you want to go. Our Service Locator can look up a multitude of contexts. Be it Weblogic/Websphere or a file system. There is no magic to it you just have to plug and play the contexts.
"I have readed the JMS and de JNDI tutorial. I have performed many tests in local mode, and i want now to do the same in a network mode... could somebody orient me? How do could i bind a connection factory with a specific resource across the network? In coding time or in deploying time?"
--I would take the performance hit on late binding and use caching to try and gain some back. Below is a small example...
-- All in all, It would help you to become more familiar with the EJB spec if your planning on that path. You soon come to notice it's features ( and particular quirks ).
Good Luck,
Hope this helps
private String serverInstance;
private String serverPort;
/** Creates new ServiceLocator */
protected ServiceLocator(String host, String port) {
this.serverInstance = host;
this.serverPort = port;
public String getServerPort() {
return this.serverPort;
public String getServerInstance() {
return this.serverInstance;
private javax.naming.Context getInitialContext() throws javax.naming.NamingException {
javax.naming.Context ctx = null;
java.util.Properties prop = new java.util.Properties();
prop.put("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");
prop.put("java.naming.provider.url", "rmi://"+serverInstance+":"+serverPort+"");
prop.put("java.naming.factory.url.pkgs", "org.objectweb.jonas.naming");
ctx = new javax.naming.InitialContext(prop);
return ctx;
public Object getContainerService(String jndiName) throws javax.naming.NamingException {
javax.naming.Context ctx = getInitialContext();
java.lang.Object obj = ctx.lookup(jndiName);
return obj;
public static ServiceLocator getInstance(String host, String port) {
return new ServiceLocator(host, port);
Maybe you are looking for
-
IPod 30 GB 'Do Not Disconnect'
The message of 'DO NOT DISCONNECT' continually shows on my iPod 30 GB even after fully updated and charged. This happened after I downloaded an update as specified when I logged into iTunes. Any ideas? Thanks Fujitsu siemens Windows XP
-
Hi, I want to make recon a/c as a required/mandatory field for all of account groups while making vendor master. plz send me the process of config settings to make this field as required/mandatory through field control.
-
Hi All, I just wanted to ask on how does a typical implementation of BI go about? I know that BI content should be installed and all. But can anyone give me high level steps on how to go about it? As far as my reading is concerned, what i should do a
-
Hello all, I have a problem that has stumped even the smartest software engineer I know. Why does the following slice of code always print out "This does not work as expected". It seems to me that the 'int' inside of the interface is implecitly final
-
Program imp. doc. inventory lx22
Hello guru´s I need to change the output of inventory document and I nedd to know wich is the printer program to modify by the developer. The t.code that generated this document inventory is LX22 Thanks a lot Best regars