Use of JMS
hai,
i am working on a B2B application.i just wanna know the real time scenario where exactly JMS can fit in a B2B application.
could you please provide me a proper explanation or with a suitable link where i can get the info'n.
any responses would be appreciated
thanks
leon
Essentially, JMS allows the sharing of information between enterprises in a loosely coupled asynchronous fashion. That is the biggest benefit to using JMS for B2B. It's difficult to dictate the interface at either end, and control the availability of either system/application. JMS, a widely accepted industry standard, provides a simple proven api to hook into and the "fire and forget" asynch approach combined with its store-n-forward capabilities, make JMS a good technology to enable B2B. However, be warned, that not all JMS implementations work well over the Internet and through firewalls and proxy servers, which is a basic requirement for creating a flexible yet secure B2B environment.
I'd also suggest picking up O'Reilly's Java Message Service book. It walks you through such an example including source code.
Professional JMS Programming from WROX is also good.
Similar Messages
-
Error while using webmethod JMS provider with JNDI
Hi,
I am using webmethod JMS provider (not SAP JMS) with JNDI to connect to webmethod with XI. Central J2EE adapter engine is used and the comm chaneel is configured in with appropriate Provider JNDI Server address, initial context factory, Name of queue connection factory etc.
While activated the adapter short log shows: Adapter has not provided any status information about this channel"
In the detailed log following error message is displayed: "Obtained connection factory: null#"
#1.5 #001A4BAC31000052000001520000152200045090BF28DACA#1214482519514#com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl##com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Entering method#
#1.5 #001A4BAC31000052000001530000152200045090BF28DB65#1214482519514#com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl##com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Debug##Plain###Looking up connection factory under name NAIP_XIQueueConnectionFactory#
#1.5 #001A4BAC31000052000001540000152200045090BF28E42E#1214482519516#com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl##com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Debug##Plain###Obtained connection factory: null#
#1.5 #001A4BAC31000052000001550000152200045090BF28E4B3#1214482519516#com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl##com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Exiting method#
#1.5 #001A4BAC31000052000001560000152200045090BF28E528#1214482519516#com.sap.aii.adapter.jms.core.connector.ConnectorImpl##com.sap.aii.adapter.jms.core.connector.ConnectorImpl.executeConnectionFactoryInvocations()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Entering method#
#1.5 #001A4BAC31000052000001570000152200045090BF28E5A9#1214482519517#com.sap.aii.adapter.jms.core.connector.ConnectorImpl##com.sap.aii.adapter.jms.core.connector.ConnectorImpl.executeConnectionFactoryInvocations()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Info##Java###Sucessfully executed CF invocations for connection factory object: for profile: #2#<null>#ConnectionProfile of channel: CC_RCV_JMS_SAPJNDIon node: 3010950 having object id: e4413a5265a436459e271d5e0dd4859b#
#1.5 #001A4BAC31000052000001580000152200045090BF28E64E#1214482519517#com.sap.aii.adapter.jms.core.connector.ConnectorImpl##com.sap.aii.adapter.jms.core.connector.ConnectorImpl.executeConnectionFactoryInvocations()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Exiting method#
#1.5 #001A4BAC31000052000001590000152200045090BF28E6CA#1214482519517#com.sap.aii.adapter.jms.core.connector.ConnectorImpl##com.sap.aii.adapter.jms.core.connector.ConnectorImpl.buildConnection()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Entering method#
#1.5 #001A4BAC310000520000015A0000152200045090BF28E741#1214482519517#com.sap.aii.adapter.jms.core.common.StringUtils##com.sap.aii.adapter.jms.core.common.StringUtils.isBlank(String str)#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Entering method#
#1.5 #001A4BAC310000520000015B0000152200045090BF28E7C3#1214482519517#com.sap.aii.adapter.jms.core.connector.ConnectorImpl##com.sap.aii.adapter.jms.core.connector.ConnectorImpl.buildConnection()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Debug##Plain###Creating connection...#
#1.5 #001A4BAC310000520000015C0000152200045090BF28EB51#1214482519518#com.sap.aii.adapter.jms.core.channel.AdapterImpl##com.sap.aii.adapter.jms.core.channel.AdapterImpl.addOrReplaceChannel(Channel cpaChannel)#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Warning##Java###Catching #1#java.lang.NullPointerException
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.buildConnection(ConnectorImpl.java:198)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.doConnect(ConnectorImpl.java:166)
at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.doConnect(JndiConnectorImpl.java:186)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connect(ConnectorImpl.java:151)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.doStart(ChannelImpl.java:235)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.start(ChannelImpl.java:154)
at com.sap.aii.adapter.jms.core.channel.AdapterImpl.doAddUpdateChannel(AdapterImpl.java:404)
at com.sap.aii.adapter.jms.core.channel.AdapterImpl.addOrReplaceChannel(AdapterImpl.java:376)
at com.sap.aii.adapter.jms.core.channel.ChannelLifecycleCallbackImpl$1.run(ChannelLifecycleCallbackImpl.java:51)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
#1.5 #001A4BAC310000520000015D0000152200045090BF28EC6A#1214482519518#com.sap.aii.adapter.jms.core.channel.AdapterImpl##com.sap.aii.adapter.jms.core.channel.AdapterImpl.addOrReplaceChannel(Channel cpaChannel)#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Error##Plain###[[ChannelName:CC_RCV_JMS_SAPJNDI,ChannelId: e4413a5265a436459e271d5e0dd4859b]] Error adding/updating channel.#
#1.5 #001A4BAC310000520000015E0000152200045090BF28ECF8#1214482519518#com.sap.aii.adapter.jms.core.channel.AdapterImpl##com.sap.aii.adapter.jms.core.channel.AdapterImpl.addOrReplaceChannel(Channel cpaChannel)#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Exiting method#
#1.5 #001A4BAC310000520000015F0000152200045090BF28ED76#1214482519519#com.sap.aii.adapter.jms.core.channel.ChannelLifecycleCallbackImpl##com.sap.aii.adapter.jms.core.channel.ChannelLifecycleCallbackImpl.channelAdded().run()#J2EE_GUEST#0##n/a##8b16bd50437911ddc9f2001a4bac3100#SAPEngine_Application_Thread[impl:3]_16##0#0#Path##Plain###Exiting method#
#1.5 #001A4BAC3100005F000000660000152200045090BF65478A#1214482523474#com.sap.aii.adapter.jms.core.channel.ChannelLifecycleCallbackImpl#sap.com/com.sap.xi.mdt#com.sap.aii.adapter.jms.core.channel.ChannelLifecycleCallbackImpl.channelAdded(Channel channel)#AAAAAAAAA#108##n/a##002ee500437911dd99cf001a4bac3100#SAPEngine_Application_Thread[impl:3]_29##0#0#Path##Plain###Exiting method#
Please let me know anyone has come accross the problem or has idea how to solve it. Thanks.Hi,
Ask ur basis admin to restart JMS adpater From Vis administrator and try again to activate the comm channel.
Hope this will solve ur problem and once again check connection fatcory and Queue name provided by Webmethod admin.
Regards,
Srini -
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 -
When using rabbitmq-jms for vFabric RabbitMQ javax.jms.Message.getJMSDestination does not return the actual destination when it is received from a consumer listening on a Topic with a wild card. I have tested with both 1.0.3 and 1.0.5 clients with RabbitMQ 3.1.5.
I was wondering if the community was aware of this problem and if there are any workarounds? If not what is the proper channel to file a bug report. An example code snippet is below. The test fails because the TextMessageMatcher expects the destination passed in on construction (second parameter) to equal the desination on the message received (aquired from getJMSDestination).
Mockery context = new Mockery();
final MessageListener messageListener = context.mock(MessageListener.class);
final Latch latch = new LatchImpl();
final String prefix = "test" + System.currentTimeMillis();
context.checking(new Expectations() {
oneOf(messageListener).onMessage(with(new TextMessageMatcher("MSG1", prefix + ".1234")));
will(new CustomAction("release latch") {
@Override
public Object invoke(Invocation invocation) throws Throwable {
latch.unlatch();
return null;
final Connection connection = createConnection(null, null);
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
connection.start();
Topic wildcardTopic = (Topic) getInitialContext().lookup(prefix + "." + "#");
Topic destination = (Topic) getInitialContext().lookup(prefix + ".1234");
final MessageConsumer consumer = session.createConsumer(wildcardTopic);
consumer.setMessageListener(messageListener);
MessageProducer producer = session.createProducer(null);
producer.send(destination, session.createTextMessage("MSG1"));
latch.await(5000);
connection.close();
Thread.sleep(5);
context.assertIsSatisfied();Check where your MDB sends the [response] messages to.
-
Configuration of JMS receiver Using Jboss JMS provider
Hi all..
I am configuring JMS adapter as receiver.
I am using JMS provider JBOSS .
I hav done configuration as
Transport protocol :Acess JMS provider with JNDI
JNDI lookUp Name of q connection factory: org.jboss.naming.LinkRefPairService
Name of JNDI initial Context factory :org.jnp.interfaces.NamingContextFactory
in sxmb_moni I am getting blak&white flag
IN Run time work bench In adapter monitoring I am getting
Receiver channel. Details: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory.
Can anybody plz tell me why this haapend?Did you deploy the JMS client jars to the J2EE Engine?
Cannot instantiate class: org.jnp.interfaces.NamingContextFactory sounds like the Framework can't find the class.
Take a look here:
Re: Using JBOSS JMS provider with XI
Greetz
Sebastian
Message was edited by: Sebastian Simon -
Content conversion by using sender JMS channel
Hi All,
I have developed a scenario from JMS to Idoc. I need to read flat files by using sender jms adapter. I have configured message transform bean in module tab and respective content conversion parameters as well. My flat files contains different structures. So I need to use conversion type as StructPlain2XML. Based on keyField value I am diffentiating flat file records. My requirement is I have to give two spaces in <xml.keyFieldValue> parameter. fixed Length of keyFieldValue is 6, Actual value getting from source file is DEST. I need to pass two spaces as per fixed length specification. I have passed two spaces, but after activating spaces are removed by system bydefault. Because of this an empty file is processed by PI. Source file contains two spaces after DEST. I need to read two spaces along with DEST value as keyFieldValue. How to achieve this..
Thanks in advance.
Best Regards,
Ashok.Hi Ashok
You can resolve this by splitting the field into two fields - and actual key field and a dummy/temp field.
I've just blogged about this technique, you can refer to it here
Content Conversion for fixed length files with key field value shorter than key field length
Rgds
Eng Swee -
When to use a JMS Bridge and when to use a Proxy
Hi,
We currently are running an OSB with most connections coming in via MQ to a JMS queue. We've been asked to implement a JMS Bridge.
Wen using a messaging bridge to a foreign provider, the documentation recommends using the Foreign JMS option to simplify the creation of bridge destinations anyway.
The key difference with using the bridge, is that you remove responsibility for the network transfer of messages from OSB's proxy and give it to the bridge. However, this now means that the messages are stored in WebLogic JMS with all the implications that brings. Is that really what you want? Isn't the whole point of MQ to be your reliable messaging service and not to use WebLogic JMS instead/as well?
But the Solutions design team mention
Without bridge
MQ >--------Receive -------->---------Send ---------> JMS
| ....... Transaction 1 ....| .....Transaction 2 ......|
With bridge
MQ >--------Receive -------->---------Send ---------> JMS
| ....... ............Transaction 1 .......... ......|
Is this true, so we have to use a bridge?I think your solution design team is wrong..
MQ --> OSB Proxy Receive ---> OSB Proxy Send --> JMS will be a single XA transaction.
An OSB proxy is preferred in this case for the following reasons:
1. Don't use bridge for receiving messages . Bridge should be used rather for sending messages to non highly available remote messaing providers. Even for this case weblogic recommends SAF .
2. Whatever the savings on transaction as mentioned by your design team doesn't appears to be correct.
3. Weblogic messaging bridge appears to be a buggy product. You will have to apply a couple of patches to make the bridge to work as expected. It will take some time to stabilise it in a production environment. Weblogic's EJB container is much stable and with MDB's it would be less prone to bugs. This is from my personal experience. Others might have a different experience.
4. You can leverage the out of box monitoring facilities provided by OSB. This can give you stats of how many messages were transferred between MQ and JMS, average & max response time etc. -
hi , we have developed an application where we have a queue in websphere MQ and the application server used is oracle 10g . Now instead of using the websphereMQ or any other third party software , can we create a a queue and queue manager(MQ terminology ) in the oracle application server. We have created the queue destination and the connection factory in the oarcle , but how actully we have to create a queue and queue manger or is it not necessary to make one or is there any other way around, and we are trying for OEMS JMS In-Memory and File-Based Persistence , and hopefully the xml files are in right place i was refering to http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref141
for the developmentThat's the right doc, you should create your destination and connection factory in jms.xml which is in j2ee/home/config directory.
Here contains howto for using OracleAS JMS in 10.1.3:
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html#JMS
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-connect-to-oemsjmsmf/doc/how-to-connect-to-oemsjmsmf.html
-Frances -
Using WebLogic JMS Wrappers with Spring
Hi,
I was just wondering if anyone used WebLogic JMS wrappers with Spring?
I am using WebLogic configured to have Sonic as my Foreign JNDI Provider. Weblogic provide me with specific entries on the admin console to set information such as the JNDI name of the Sonic Connection Factory. If I specify this JNDI name in the Spring config, and call getConnection() then I will get back a new connection each time.
I don't want this, I want to cache the connection (as connections are expensive in Sonic). This is where the WebLogic JMS wrappers come in, they can handle the pooling for me but the only way I can see to use them is via a resource-ref. It is possible for Spring to get a handle onto these wrappers or should I use Spring's own pooling mechanism instead?
P.S. I've also asked this question on the Spring forum
Thanks for any help
MandyMaybe you have already tried the following:
<beans xmlns:jee="http://www.springframework.org/schema/jee" ... >
<jee:jndi-lookup id="connectionFactory" jndi-name="jms.ConnectionFactory">
<jee:environment>
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://localhost:7001
</jee:environment>
</jee:jndi-lookup>
</beans>
an alternative is to use the JNDI template
<beans ... >
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
<prop key="java.naming.provider.url">t3://localhost:7001</prop>
</props>
</property>
</bean>
<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate" />
<property name="jndiName"><value>jms.ConnectionFactory</value></property>
</bean>
</beans> -
Dequeuing a Map message from AQ using Java/JMS
I have a queue in Oracle AQ, created from a queue table with queue_payload_type of SYS.AQ$_JMS_MAP_MESSAGE. I can successfully enqueue a Map message using PL/SQL, but when I try to read a message from the queue using the JMS API (with the Oracle AQ JMS provider JARs) in a standalone Java program, the message is not successfully read. However, the RETRY_COUNT in the queue table is incremented each time I try to read from the queue. I do not receive any error messages on the client side.
If I change the queue_payload_type of the queue table to SYS.AQ$_JMS_TEXT_MESSAGE instead and enqueue a text message using PL/SQL, I can read the text message successfully in the standalone Java program using JMS. The message is removed from the queue and everything works fine.
Most Oracle AQ/JMS examples I've found on the web involve text messages. Has anyone been able to read a Map message from an Oracle AQ queue using JMS, or is there a known issue with Map messages?
I'm running Oracle 10g Standard Edition version 10.2.0.1.0 on Windows XP.
Thanks for your help,
MartyWhile you are awaiting an answer you might want to consider applying the 10.2.0.4 patch. Your version is several years old and patches are free.
-
How to use remote JMS in websphere5?
I want to use JMS in another server to send message so that I config required jndi in server. When I lookup local JMS jndi(connection factory, queue) it works correctly. But when I lookup remote connectionfactory, it throws 'javax.naming.CommunicationException'. BTW, local configuration is same as JMS server. And I use WSAD 5.1.1 to develop it.
The first question is if I need use JMS server on another server, I should lookup remote queue and JMS connection factory on that server, right?
The second question : If yes, how to obtain remote JMS connection factory? I use WSAD 5.1.1 trail, I don't know is it possible to obtain remote jndi.
The third question : do I need change any configuration for supporting remote JMS client instead of local(same compute, different jvm) environment?
The following is my client code to obtain remote queue:
public class Test {
public static void main(String[] args) {
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "corbaloc:iiop:10.240.4.203:2809");
try {
Context initialContext = new InitialContext(env);
Object obj = initialContext.lookup("jms/IPharmQueue1");
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}It works ok when ip is localhost. But it can obtain remote queue or connectionfactory. I tried to lookup other EJB, it also failed.Actually, I have application in one server and four same server as cluster. But only one server provides JMS service. So my application need to use remote JMS server instead of local server. But in my development environment I can not simulate cluster environment as customer environment. So I try to let my application access remote JMS server in different computer. When two server start up I found my application will get local JMS connection factory and queue instead of remote factory. Even I put IP of another computer in PROVIDER_URL.
I did a application client to test it. The code is above. But it can not lookup remote jndi.
I use WAS5 as server and WSAD 5.1.1 as development IDE.
Is any idea about it? -
Making AQ usage transactional across session beans, using mosly JMS syntax
I need to determine what I need to have in place in order for JMS/AQ messages to be "fully transactional".
I have a J2EE server application that will send JMS/AQ messages to a queue. I have a standalone application that reads messages from the queue, does some work, and then makes calls on multiple session beans (hosted in the original J2EE server application). Actually, it would likely be multiple calls to the same session bean method.
Once the standalone application reads a message from the queue, I need to ensure that if any action performed as a result of that message fails, that all the operations performed, including the removal of the message from the queue, are rolled back.
First of all, if I use an Oracle XA-compliant datasource, if one of the session bean calls fail, I can rollback the current transaction, but will this properly roll back any work that earlier session bean calls (made on the same transaction) did, even if they were successful (at the time)? Note that I have two JVMs, one running the J2EE application, and the other a standalone application reading from the queue.
Second, on committing or rolling back the message retrieval itself, I noticed from examples in the Oracle AQ Application Developer's Guide that if I create my QueueSessions with "AQDriverManager.createAQSession()", that I can pass a Connection object, and then later "commit" or "rollback", manually, perhaps if I got an EJBException from a session bean call.
However, I am trying to write my JMS/AQ code so that it uses as little of the direct AQ api as possible, staying with the standard JMS api. As a result, I'm using the JMS version of this, which is "QueueConnection.createQueueSession()". When I do this, however, it seems as if I lose control over the transaction.Ok, I think I've answered some of this for myself, but I still have some concerns.
I see that the QueueSession object that I get back from "queueConnection.createQueueSession()" is likely going to actually be an instance of the "AQjmsSession" class, so I can cast to that, and then I can call "commit" or "rollback".
What is unclear from the javadoc description is what happens when "close()" is called on the session object. Does this do an implicit "commit()", perhaps unless "rollback()" has already been called?
I'm still a little uncertain about whether the scope of my transaction will be wide enough to protect everything that needs to be protected.
For instance, I assume that my transaction starts when my consumer (not in an application server) reads the message from the queue. At that point, my consumer does some "screen-scraping" work. When it's done, it will call a session bean on the application in the application server (separate JVM, in other words), which will create some EJB entity objects and also insert raw database rows. The session bean will then return, and then the original method which read a message from the queue will be completed.
What I need to know is what will happen if ANYTHING in that process fails, either in the external consumer, or in the session bean, or creating EJB entities? That is, will the entire transaction be rolled back, undoing the EJB entity creations AND the removal of the message from the message queue?
If this can possibly work, I'm assuming this would be utilizing an XA datasource, or a non-emulated data source (which I think means the same thing). -
Bridge between JCAPS 5.1.3 and JCAPS6 using STC JMS
Hi
Would be glad if someone could help me configure Glassfish (that we use developing applications in JCAPS6) to use STC JMS. Do not really know how to setup the JMS Resources to access the message servers that we have configured in JCAPS 5.1.3. I try to use connectionURL property but glassfish does not like it, I get a warning in the log "The method setConnectionURL is not present in the class : com.sun.messaging.jms.ra.ManagedConnection"
Brhi faldo,
which connection url have you tried?
are you talking about repository based projects?
we are doing this by adding a"Unified JMS Ressource"server to the "Caps 6 environment" (bridge to STCMS ICAN 505)
and pointing this ressource to "stcms://somehost:8888"
regards chris -
Using SOAP-JMS binding for business process
Hi all,
We are currently designing one business process which consume MQ messages. The MQ message body is SOAP XML. SOAP Headers carry business specific important data section, so we don't want to loose these headers at any cost. The message consumer is the Websphere process choreographer business process, reading message as a JMS message. When we develop the business process, we are planning to use SOAP-JMS binding. But problem with SOAP-JMS binding is: when the MDB reads the message off the message queue, it strips off all the SOAP headers and delivers only the SOAP body. Is there a way to make this behaviour change to keep the SOAP headers? You may suggest to use JMS bindings, but JMS binding will send the message body as WSIF message (as a serialized java object). I'm not sure of how easy it is to marshalling/unmarshalling of this serialised object. My main concern is around, how to identify the "type" of the message while marshalling. Would writing our own MDB solve the problem? Again MDB's sends messages as WSIF messages to the business process EJB's, which I guess I get stumble across the same marshal/unmarshall problem. Hope I made myself clear of what i'm going trying to do. Any advice is highly appreciated.
Regards,
PrasadHello Markus,
I just paste my answer form the other forum entry Re: Business process management strategy in SAP?
in a nutshell BPM Netweaver is focussing on so called edge-processes (usually
SOA-based and often workflow related). These edge-processes a thought to enhance exisitng core business processes and should provide the fast competitive edge versus competitors. Examples would be also xApps. For this Netweaver provides process modelling tools, where you can get exectuable code through the integration between CE and PI. The monitoring part for these processes is mainly targeting business end-users and business manager.
Business Process Monitoring with Solution Manager focusses on core business processes which are realized with the "conventional", "old" SAP Architecture, e.g. Order-to-Cash or Procure-to-Pay. You get a combination of technical monitors (average response times of transactions, background job runtimes, monitors for IDOC or qRFC processing) and application related monitors (you get more than 200 pre-configured application monitors out-of-the-box like number of overdue customer orders or outbound deliveries or number of deliveries with goods issue posted but no invoice). The target group here is the support organization of the customer, from Basis-Support over application support on IT side to process owner on business department side.
Overview presentations can be found under
https://service.sap.com/bpm --> Media Library --> Customer Information -->
"Business Process Monitoring - Part 1 & 2".
Or look under https://www.sdn.sap.com/irj/sdn/nw-processmonitoring
In the end BPM Netweaver and BPMon SolMan are complementary for different purposes and different target groups.
Best Regards
Volker -
Experiences using the JMS Message Selector
I am using a JMS Adapter Sender Communication Channel and try to select the messages I want to consume with the Message Selector. My first attempts all failed - I am not sure if the syntax I am using is correct or if anything else has to be set up to use the Message Selector.
My sample was to enter the following into the field for Message Selector:
JMSCorrelationID = '123456789012345678901234'
I also tried the following variations:
JMSCorrelationID = "123456789012345678901234"
JMSCorrelationID = 'ID:123456789012345678901234'
JMSCorrelationID = "ID:123456789012345678901234"
but none of them were successful.
Anybody got that feature to work yet and can help me...
regards,
peterNow I found it out finally...
JMSCorrelationID = 'ID:41727469636c655570646174656400000000000000000000'
where ID: is obviously added by JMS? XI? don't know... and the actually id is in Hex...
can anybody enlighten me on the details?
regards
Peter -
Using JBOSS JMS provider with XI
Hi,
I am connecting XI to a custom Java application developed on JBOSS app server. The custom application is developed with connectivity using JMS. I was told that JBOSS has a JMS provider used by the custom app. Has anyone done this before? Is it possible for XI to use JBOSS JMS provider? How difficult is this going to be for synchronous interface? Any information is greatly appreciated.
thanks.
James Changhi,
first deploy jboss-j2ee.jar,jms.jar,dom4j-full.jar..for deploying these jars into the xi follow this link
http://help.sap.com/saphelp_nw04s/helpdata/en/33/e6fb40f17af66fe10000000a1550b0/frameset.htm
then to make use of the JMS adapter follow this link,
http://help.sap.com/saphelp_nw04s/helpdata/en/4d/a3bc97ff55c742af7faed661635baf/frameset.htm
hope this will be useful.....
regards,
Sundararamaprasad
Maybe you are looking for
-
Problem while partitioning The Table
create table Employee ( empno number(3), name varchar2(10), deptno number(4)) partition by range(deptno) (partition p1 values less than(11), partition p2 values less than(21), partition p3 values less than(31)); create table Employee ( ERROR at line
-
Recommendations please - now or wait??
hi, I see a few people already have Snow Leopard installed. Is Safari and Mail crashing for everyone with SL? would those who have it recommend waiting at least the first update/fix? cheers
-
Hi All, While starting up netweaver I get the following error in dev_dispatcher. THe following is the trace file: trc file: "C:\usr\sap\J2E\JC01\work\dev_dispatcher", trc level: 1, release: "700" node name : ID11241900 pid : 3884 system nam
-
Error problem on 1841 cisco router
00:29:16: ASSERTION FAILED: file "../chips/gt96k/gt96k_timer.c", line 771 The above error console message is coming on cisco 1841 router. Cisco IOS Software, 1841 Software (C1841-IPBASE-M), Version 12.3(8)T8, RELEASE OFTWARE (fc1) Technical Support:
-
Upgrade discount amount ?
I am eligible for New Every Two and my upgrade discount is $50. I was talking to a buddy who is also eligible but gets $100 discount on the same exact phones. WTH ? They just give some people better deals than others ? Not fair