WebLogic JMS and MQ JMS Mix

          I am writing a bean that reads a message from MQ (using MQJMS) and then write it
          onto a WebLogic JMS ( something lika a bridge). However I don't want to use bridge.
          Question/Problem Statement:
          Once I include mq jms jar files in class path. Would that in conflict with WebLogic
          JMS. How do in my program I make sure that it is using the MQ or WLS JMS implementation.
          I can have InitialContext() setup for mq in File and for WebLogic it is WebLogic's
          Initial Context. Thats is the only thing that I can tell in the program.
          Basically, I am trying to see what will make it ( fully qualified JMS Objects
          or what) decide which implmenatation to use.
          Chris
          

The WebLogic JMS and MQSeries JMS classes won't conflict. Each JMS provider
          provides different classes that implement the same interfaces, so you can
          have a whole bunch of providers in your classpath and things should be OK.
          Most code that's written to the JMS API (including the code inside WLS that
          receives messages for MDBs) gets the JMS "ConnectionFactory" via JNDI, and
          uses that to create the other objects. (It also has to look up the
          "Destination" objects from JNDI.) When you code to the JMS standard only,
          then the only thing that "tells" your program which provider is being used
          is the ConnectionFactory class that you create or get out of JNDI.
          Below is my usual plug for the white paper that helps explain some of this
          stuff:
          http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
          Look for "Using foreign JMS provdiesr with WLS".
          greg
          "Chris" <[email protected]> wrote in message
          news:[email protected]...
          >
          > I am writing a bean that reads a message from MQ (using MQJMS) and then
          write it
          > onto a WebLogic JMS ( something lika a bridge). However I don't want to
          use bridge.
          >
          > Question/Problem Statement:
          > Once I include mq jms jar files in class path. Would that in conflict with
          WebLogic
          > JMS. How do in my program I make sure that it is using the MQ or WLS JMS
          implementation.
          > I can have InitialContext() setup for mq in File and for WebLogic it is
          WebLogic's
          > Initial Context. Thats is the only thing that I can tell in the program.
          >
          > Basically, I am trying to see what will make it ( fully qualified JMS
          Objects
          > or what) decide which implmenatation to use.
          >
          > Chris
          

Similar Messages

  • How to configure global transaction wthin Oracle AS JMS and Oracle JMS

    How to configure global transaction if I take a message from Oracle JMS(AQ) and send it to the Oracle JMS?

    Which version of OC4J are you working on?
    In OC4J 10.1.3.x, presume your OC4J JMS listens messages via MDB which uses a resource adapter as a message listener. The resouce adaper could be the generic JMS adapter deployed in OC4J as the default.
    Resource adapter configuration to support MDBs is included in the standard ra.xml file, which lists the message listener types that the resource adapter supports.
    The MDB developer or deployer configures the MDB in the ejb-jar.xml file, through a <message-driven> element.
    In addition to above, configuration in the ejb-jar.xml file specifies whether an MDB uses transactions.
    1) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, and the <trans-attribute> subelement of <container-transaction> (under the <assembly-descriptor> element) has a value of Required. In this circumstance, if there is an imported transaction, then message delivery and related work are performed within that transaction. If there is no imported transaction, OC4J creates a transaction, and message delivery and related work are performed within that transaction.
    2) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Bean. In this circumstance, the MDB manages the transaction. If a transaction is imported, OC4J will suspend it before the message delivery method call to the MDB, in order to avoid conflict.
    Message delivery is not transacted if the <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, but the <trans-attribute> element has a value of NotSupported. If there is an imported transaction in this circumstance, OC4J will suspend the transaction before the message delivery method call to the MDB.
    Details could be found from OC4J Resource Adapter Guide.

  • JMS to non-JMS

    We have developed a non-JMS Messaging system (used publisher-subscriber model, following avalon framework). Now my requirement is to listen to the JMS events. I mean, my event listener should be able listen to event published by any JMS messaging system. Is there any way to do this.
    We need to see a way to interop with JMS requests and send responses. ie bringing a sort of compatibility in exchanging messages between JMS and non-JMS Notification services. is there any way to do it?

    Yeah, I too have a idea of using MDB to achieve this. Can you please provide some information on this or some links or prototypes where it has been implemented.

  • Unable to create a JMS Message bridge between Weblogic 12c and Weblogic 8.1

    Hi,
    I am unable to successfully create a Message Bridge between Weblogic 12.1.1.0 and Weblogic 8.1. The error message being received is:
    eis/jms/WLSConnectionFactoryJNDINoTX > ResourceAllocationException generated by resource adapter on call to ManagedConnectionFactory.createManagedConnection(): "javax.resource.ResourceException: ConnectionFactory: failed to get initial context (InitialContextFactory =weblogic.jndi.WLInitialContextFactory, url = t3://localhost:8001, user name = System) ">
    The error on the monitoring tab is WARN: failed to connect to target.
    Both domains are deployed on one box for testing purposes. The bridge itself is deployed on Weblogic 12c. The areas of config that may be of interest are:
    <server>
    <name>AdminServer</name>
    <listen-address></listen-address>
    </server>
    <messaging-bridge>
    <name>Bridge</name>
    <target>AdminServer</target>
    <source-destination>JMSBridgeSource12c</source-destination>
    <target-destination>JMSBridgeTarget81</target-destination>
    <selector>Test</selector>
    <quality-of-service>Exactly-once</quality-of-service>
    <qos-degradation-allowed>false</qos-degradation-allowed>
    <durability-enabled>true</durability-enabled>
    <idle-time-maximum>60</idle-time-maximum>
    <async-enabled>true</async-enabled>
    <started>true</started>
    <preserve-msg-property>false</preserve-msg-property>
    </messaging-bridge>
    <app-deployment>
    <name>jms-xa-adp</name>
    <target>AdminServer</target>
    <module-type>rar</module-type>
    <source-path>D:\ORACLE~3\WLSERV~1.1\server\lib\jms-xa-adp.rar</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    </app-deployment>
    <jms-bridge-destination>
    <name>JMSBridgeSource12c</name>
    <adapter-jndi-name>eis.jms.WLSConnectionFactoryJNDIXA</adapter-jndi-name>
    <user-name>System</user-name>
    <user-password-encrypted>{AES}nfFzhs+0J/O2Cenf0g4zDsDyvIKENMF7cZ5sAVUehX0=</user-password-encrypted>
    <classpath></classpath>
    <connection-factory-jndi-name>JMSConnectionFactory12c</connection-factory-jndi-name>
    <connection-url>t3://localhost:7001</connection-url>
    <destination-jndi-name>JMSQueue12c</destination-jndi-name>
    </jms-bridge-destination>
    <jms-bridge-destination>
    <name>JMSBridgeTarget81</name>
    <adapter-jndi-name>eis.jms.WLSConnectionFactoryJNDIXA</adapter-jndi-name>
    <user-name>System</user-name>
    <user-password-encrypted>{AES}eBkO46cHvtrzEraOMIOdXow6WvEAtA4NCUDTQ4mC+9w=</user-password-encrypted>
    <classpath></classpath>
    <connection-factory-jndi-name>JMSConnectionFactory81</connection-factory-jndi-name>
    <connection-url>t3://localhost:8001</connection-url>
    <destination-jndi-name>JMSQueue81</destination-jndi-name>
    </jms-bridge-destination>
    I have enforced global trust between the two domains. I have disabled the guest user on the 8.1 domain but can’t see where to do this on 12c.
    Any suggestions would be much appreciated.
    Regards
    John
    Edited by: 958336 on 13-Sep-2012 03:11

    Thanks for the recommendation. Unfortunately it did not help solve the problem.
    I have managed to get a JMS bridge working between 12c and 8.1 by including the 8.1 weblogic.jar on the classpath. This setup was using eis.jms.WLSConnectionFactoryJNDINoTX.
    After trying to use the adapter that supports transactions, WLSConnectionFactoryJNDIXA I received the following error:
    java.lang.IllegalStateException: can only be called from server
    Is this because the Weblogic 12c server now views the 8.1 server as being foreign?

  • Any kind of integration experience with Weblogic JMS and Oracle AQ?

    Hi,
    In my company I work with java developers who believe in some kind of "holly" database independence I don't understand and as a result my life as a database developer is hell on earth.. Yesterday we again started to discuss, this time where to log, they believe database is slow and prefer logging to filesystem, after some hours finally I could convince them for some operational and reporting needs to use the database and will do this in an asyncronous way whiich they won't get slow. After all I believe the reason for a database is data, this is the place where data lives, and with the correct desing and implementation logging to database would perform better.
    I love Oracle features, and know that we paid a lot for this software, so today I started investigating this promised solution. And quickly I found AQ and JMS topics in the documentation :)
    After this introduction here is my problem; my company use BEA Weblogic as application server and the java guys want AQ to automatically (but of course with some delay) take their JMS log requests into database tables. Does any one have similar application experience, or any kind of integration experience with Weblogic JMS and Oracle AQ?
    Any comments, references, documentation, sample code, url will be most welcomed :)
    Thank you very much!
    Tonguc
    [email protected]
    References I found upto now;
    Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14291/toc.htm
    (Packages; javax.jms & oracle.jms)
    Oracle® Streams Advanced Queuing User's Guide and Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14257/toc.htm
    Part IV
    Using Oracle JMS and Oracle Streams AQPart V describes how to use Oracle JMS and Oracle Streams Advanced Queuing (AQ).
    Chapter 11, "Introducing Oracle JMS"
    Chapter 12, "Oracle JMS Basic Operations"
    Chapter 13, "Oracle JMS Point-to-Point"
    Chapter 14, "Oracle JMS Publish/Subscribe"
    Chapter 15, "Oracle JMS Shared Interfaces"
    Chapter 16, "Oracle JMS Types Examples"
    A Sample Code from Otn
    http://www.oracle.com/technology/sample_code/tech/java/web_services/jmsws/NewsQueueEJB.java.html

    I wouldn't go as far to say Oracle AQ is out-dated today. However, it is indeed a proprietary technology that did not found much main-stream adoption in the earlier years after its introduction. The advent of JMS made it somewhat more useful (or should I say intriguing, because more people are trying to tie it together with other J2EE technologies), but the Oracle's JMS wrapper classes in aqapi.jar were not feature complete for a long while, so using it outside Oracle's application server was painful, if not impossible. I do agree that the info at the dev2dev's JMS newsgroup or in this forum is highly fragmented, as neither Oracle nor BEA provides an official solution to integrate AQ with WebLogic, so people like us have to learn the technology through experimentation and in a piecemeal fashion.
    3 years ago I was literally "playing around" - we had a polling mechanism set up to use triggers to write Oracle data changes into an event table, and had a Java-based daemon to scan that table and publish events as JMS messages to the WebLogic JMS server. This continues to work reliably till today, but I was looking for a solution that has few parts - I wanted to hook up my WebLogic MDB directly to AQ as a foreign JMS provider. Although I was able to get it to work (including XA), there were a few hoops I had to jump through, such as decompiling the Oracle AQjms classes to make them bind to the WebLogic JNDI tree.
    One year after that Diptanshu Parui took what I did a giant step further - he extended the Oracle AQjms classes to allow them to be bound to the WebLogic JNDI tree naturally, and he figured out how to use WebLogic JMS messging bridge to re-send single-threaded AQ JMS messages to clustered JMS queues, which allow concurrent message assumption by multiple instances of MDB's. My impression is that he is using that setup in a production environment.
    I am sure you are aware of it but I would like to make it clear - in order to use AQ as a foreign JMS provider to WebLogic-hosted MDB's, you don't need to update your database to Oracle 10g - Oracle 8i is good enough (although I recommend at least 9i Release 2). It is not the database engine, but rather the aqapi.jar JMS wrapper on top of AQ that matters. I do recommend that you use aqapi.jar from Oracle Application Server 10.0.3 or up for better XA support, among other things. Again, you don't have to replace WebLogic with Oracle AS - you only need a single jar file from it and put it in your WebLogic's classpath. However, I don't know what this means from a licensing point of view if you ever go to production - do you have to pay the full price of OracleAS or OC4J just to use the aqapi.jar?
    In the coming days I will test the latest aqapi.jar to see how much progress Oracle has made in terms of making their J2EE products more spec-compliant :-).
    Hope the above gives you a different perspective.
    Eric

  • Is there a problem with JMS and Weblogic?

              Hi,
              I am using JMS and Weblogic (Not Message Driven bean).
              My problem is that after some time my listeners disappears.
              I am sending them a message and instead of 6 listeners
              I get only 4 messages.
              So, My question is: Is there any problem working with JMS
              and Weblogic???
              Thanks,
              Tal.
              

    Too little information and a very vague question. Need more info.
              "Tal" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Hi,
              > I am using JMS and Weblogic (Not Message Driven bean).
              > My problem is that after some time my listeners disappears.
              > I am sending them a message and instead of 6 listeners
              > I get only 4 messages.
              > So, My question is: Is there any problem working with JMS
              > and Weblogic???
              > Thanks,
              > Tal.
              

  • Weblogic JMS and BPEL Process

    Hello,
    Can someone please help me with the steps necessary to configure a BPEL process to accept messages from a JMS queue hosted on Weblogic 9.x?
    My setup:
    - Weblogic 9.1 hosts JMS queues
    - Oracle BPEL 10.1.3.1.0 hosted in OC4J
    - I have not touched oc4j-ra.xml to configure a JMS queue or connection factory. It looks as if the BPEL designer in JDeveloper allows you to specifiy everything necessary for this descritor.
    - I have not moved any jars from my appserver (weblogic) into BPEL's classpath.
    I have a JMS Adapter configured to point to my JMS queue. My jca:address looks as follows:
    <jca:address location="order.process.queue"
    ManagedConnectionFactory="oracle.tip.adapter.jms.JmsManagedConnectionFactory"
    mcf.ConnectionFactoryLocation="jms.connection.factory"
    mcf.FactoryProperties="java.naming.provider.url=http://wljms:7001"
    mcf.IsTopic="false"
    mcf.IsTransacted="false"
    mcf.Username=""
    mcf.Password=""
    UIJmsProvider="THIRDPARTY" />
    I receive the following exception:
    ORABPEL-12141
    ERRJMS_CONN_FAC_NOT_FOUND.
    Unable to instantiate connection factory. JMS adapter was unable to look up the connection factor jms.connection.factory neither through JNDI nor instantiate it as a Java class
    Please examine the log file to determine the problem.
    The stacktrace that follows points to a naming exception:
    Caused by: javax.naming.NameNotFoundException: jms.connection.factory not found
    I've seen posts on this forum where people have included jars from their app server distro on to OC4J's (or whatever BPEL's container) classpath. Is this the correct thing to do? That approach looks like it could be trouble.
    I've verified that my queue is set up correctly on the Weblogic side. I am able to place messages on queue successfully. I can also see my Weblogic server from the BPEL server.
    Any help is appreciated!
    Al

    Thank you for the reply. I did change the protocol to use t3 and copied the weblogic.jar over to the BPEL server under "\j2ee\home\applib". Now, I get a whole host of other exceptions related to JNDI lookups related for bpel related resources such as"java:comp/env/jms/collaxa/BPELWorkerQueue". The good news is that this happens whenever I drop a message on queue, so I am almost there.
    Is there any documentation on this particular setup? I suspect a collision in JNDI classes between OC4J and weblogic now.
    Here is a snap of my stacktrace:
    <2007-10-10 09:43:34,513> <ERROR> <default.collaxa.cube.activation> <AdapterFramework::Inbound>
    java.lang.Exception: Failed to create "java:comp/env/ejb/local/CubeDeliveryLocalBean" bean; exception reported is: "javax.naming.NameNotFoundException
    : remaining name: env/ejb/local/CubeDeliveryLocalBean
    at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
    at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)
    And later on...
    <2007-10-10 09:41:52,024> <ERROR> <default.collaxa.cube.engine.dispatch> <Dispatcher::adjustThreadPool> Error allocating 1 thread(s)
    ORABPEL-05005
    Cannot send JMS message.
    The process domain was unable to send a message to the JMS queue "". The exception reported is: Cannot lookup context object.
    The process domain was unable to lookup the context object using the bind name "java:comp/env/jms/collaxa/BPELWorkerQueue". The exception reported is
    : remaining name: env/jms/collaxa/BPELWorkerQueue
    Please verify the JNDI identifier is valid.
    Please check that the JMS service for the application server has been configured properly.
    at com.collaxa.cube.engine.ejb.impl.DispatcherBean.send(DispatcherBean.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:620)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxNotSupportedInterceptor.invoke(TxNotSupportedInterceptor.java:43)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at DispatcherBean_LocalProxy_4bin6i8.send(Unknown Source)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendLocal(DispatchHelper.java:450)
    at com.collaxa.cube.engine.dispatch.Dispatcher.adjustThreadPool(Dispatcher.java:711)
    at com.collaxa.cube.engine.dispatch.Dispatcher.receive(Dispatcher.java:453)
    at com.collaxa.cube.engine.ejb.impl.DispatcherBean.schedule(DispatcherBean.java:87)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:620)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxNotSupportedInterceptor.invoke(TxNotSupportedInterceptor.java:43)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at DispatcherBean_RemoteProxy_4bin6i8.schedule(Unknown Source)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.scheduleRemote(DispatchHelper.java:366)
    at com.collaxa.cube.engine.agents.BaseSimpleAgent$SimpleJob.execute(BaseSimpleAgent.java:271)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
    <2007-10-10 09:41:52,024> <DEBUG> <default.collaxa.cube.engine.agents> <SimpleJob::execute> Sent message to dispatcher
    <2007-10-10 09:41:52,024> <DEBUG> <default.collaxa.cube.engine.agents> <SimpleScheduler::schedule> Next activation time for agent dispatch: Wed Oct 10
    09:43:52 EDT 2007

  • JMSML - XML Based Mark-Up Language for BEA WebLogic JMS and JMX

              JMSML is a Mark-Up language designed and developed to make Java Messaging Service
              (JMS) and Java Management Extensions (JMX) programming easy by hiding all the
              JMS and JMX Java API complexity behind a few, simple, easy to use XML tags.
              Both the White Paper and the binary download are available in dev2dev.beasys.com
              at the link below:
              http://dev2dev.beasys.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
              Regards
              [email protected]
              

    Hi,
    I finally managed to post a message to ActiveMQ 5.4.2 from WLS 10.3. I created a foreign JMS Server in WLS. I am not sure if you still have this issue, but I was facing this problem and managed to resolve it so posting the reply!
    I placed the activemq-all-5.4.2.jar file in WLS server classpath.
    The settings I used for the Foreign Server are:
    General tab
    JNDI Initial Context Factory: org.apache.activemq.jndi.ActiveMQInitialContextFactory
    JNDI Connection URL: tcp://localhost:61616
    Destinations Tab
    Name: TestQueue
    Local JNDI Name: TestQueue
    Remote JNDI Name: dynamicQueues/TestQueue (I tried with a normal queue, but it didn't work. So used dynamicQueues here. Will try with other queue also)
    Connection Factories Tab
    Name: AMQConnectionFactory (
    Local JNDI Name: AMQConnectionFactory
    Remote JNDI Name: ConnectionFactory (This is default name given by Active MQ, you can change by adding names in jndi.properties file and placing it in config folder of ActiveMQ installation. Please check here: http://activemq.apache.org/jndi-support.html)
    Using this configuration I was able to post message to ActiveMQ queue from Oracle Service Bus. One more issue to be taken care is that if the message type is not "Text" then the message body was coming as blank in ActiveMQ. So set the message type as "Text" explicitly.

  • JDBC, JMS and EJB transactions - possible problem?

    Hello,
              I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and
              XDoclet.
              In my current project I have the following piece of code
              in one of my message driven beans (code cited as pseudocode
              without unnecessary details):
              * @ejb.bean name="MyMessageProcessor"
              * display-name="Display name for a MyMessageProcessor"
              * jndi-name="ejb/MyMessageProcessor"
              * description="Bean MyMessageProcessor"
              * destination-type="javax.jms.Queue"
              * transaction-type="Container"
              * acknowledge-mode="Auto-acknowledge"
              * subscription-durability="Durable"
              * generate="false"
              * @ejb.transaction type="Required"
              public class MyMessageProcessor implements MessageDrivenBean, MessageListener {
              public void onMessage(Message msg) {
                   try {
                        //obtaining connections to two different databases via JNDi
                        java.sql.Connection connOne =
                        ((DataSource)ctx.lookup("DataSourceOne")).getConnection();          
                        java.sql.Connection connTwo =
                             ((DataSource)ctx.lookup("DataSourceTwo")).getConnection();
                        // performing some UPDATEs and INSERTs on connOne and connTwo
                        // calling some other methods of this bean
                        //creating the reply JMS message and sending it to another JMS queue
                        Message msgTwo = this.createReplyMessage(msg)
                        this.queueSender.send(msgTwo);
                        //commiting everything
                        this.queueSession.commit();          
                   } catch (Exception ex) {
                   try {
                        if (this.queueSession!=null) this.queueSession.rollback();
                   } catch (JMSException JMSEx) {};     
                   this.context.setRollbackOnly();
              Some days ago (before the final remarks from my client) there used to be only one DataSource configurated on the basis of the
              connection pool with non-XA jdbc driver. Everything worked fine
              including the transactions (if anything wrong happend not only wasn't the replymessage sent, but also no changes were written
              to database and the incomming message was thrown back to the my bean's
              queue).
              When I deployed the second DataSource I was informed by an error message, that only one non-transactional resource may
              participate in a global transaction. When I changed both datasources
              to depend on underlying datasources with transatcional (XA) jdbc drivers, everything stopped working. Even if
              EJB transaction was theoretically successfully rolledbacked, the changed were written to the database
              and the JMS message wasn't resent to the JMS queue.
              So here are my questions:
                   1. How to configure connection pools to work in such situations? What JDBC drivers should I choose?
                   Are there any global server configurations, which may influence this situation?
                   2. Which jdbc drivers should I choose so that the container was able to rollback the database transactions
                   (of course, if necessary)?
                   3. Are there any JMS Queue settings, which would disable the container to send message back to the
                   queue in case of setRollbackOnly()? How should be the Queue configurated?
              As I am new to the topic and the deadline for the project seems to be too close I would be grateful
              for any help.
              This message was sent to EJB list and JDBC list.
              Sincerely yours,
              Marcin Zakidalski

    Hi,
              I found these information extremely useful and helpful.
              The seperate transaction for sending messages was, of course, unintentional. Thanks a lot.
              Anyway, I still have some problems. I have made some changes to the
              code cited in my previous mail. These changes included changing QueueSessions
              to non-transactional. I also set the "Honorate global transactions" to true.
              I am using XA JDBC driver. After setting "Enable local transactions" to false
              (I did it, because I assume that JDBC transactions should be part on the global
              EJB transaction) I got the following error:
              java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA
              driver supports performing SQL operations with no global transaction, explicitly allow it by setting
              "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local
              transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To
              complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
              I have also inspected the calls of methods of bean inside of onMessage() method just to check, whether
              the transactions are correctly initialized (using the weblogic.transaction.Transaction class).
              My questions are as follows:
              1. Any suggestions how to solve it? I have gone through the google answers on that problem and only
              thing I managed to realize that JDBC must start its own transaction. Is there any way to prohibit it
              from doing that? Can using setAutocommit(true/false) change the situation for better?
              2. How to encourage the JDBC driver to be a part of EJB transaction?
              3. As I have noticed each of ejb method has its own transactions (transactions have different
              Xid). Each method of the bean has "required" transaction attribute. Shouldn't it work in such
              way that if already started transaction exists it is used by the called method?
              4. The DataSources are obtained in my application via JNDI and in the destination environment I will have slight
              impact on the configuration of WebLogic. What is least problematic and most common WebLogic configuration which would
              enable JDBC driver to participate in the EJB transaction? Is it the WebLogic configuration problem or can it be
              solved programmically?
              Currently my module works quite fine when "enable local transactions" for DataSources is set to true, but this way
              I am loosing the ability to perform all actions in one transaction.
              Any suggestions / hints are more than welcomed. This message was posted to jdbc list and ejb list.
              Marcin

  • Weblogic 10 Ant task, JMS Module & Foreign JMS Destinations

    Any body knows how to configure JMS System Modules (which got introduced in WL ver. 9) and other JMS MBeans such as JMS Destinations and ConnectionFactories under the newly created JMS Module, using ant task for Weblogic 10.3 ?
    Also, when I create the ForeignJMSServer and the child MBeans such as Foreign Destinations and ConnectionFactories using ant task, it just creates the ForeignJMSServer and not creating the child MBeans. The problem is with WL 10. In WL 8.1, it works fine.
    In Weblogic 8.1, þe ant target for this job is as follows.
    ===========================================================================
         <target name="prepareForeignJMSServer">
    <wlconfig url="t3://localhost:7001" username="weblogic"
    password="weblogic" failonerror="false">
    <create type="ForeignJMSServer" name="myForeignJMSServer" property="temp-jms-server">
    <set attribute="InitialContextFactory" value="weblogic.jndi.WLInitialContextFactory"/>
    <set attribute="ConnectionURL" value="t3://192.168.0.23:7001"/>
    <set attribute="Targets" value="mydomain:Name=myserver,Type=Server"/>
    <create type="ForeignJMSConnectionFactory" name="MyRemoteCF">
    <set attribute="LocalJNDIName" value="MyLocalCFJNDI"/>
    <set attribute="RemoteJNDIName" value="MyRemoteCFJNDI"/>
    <set attribute="Username" value="weblogic-remote"/>
    <set attribute="Password" value="weblogic-remote"/>
    </create>
    <create type="ForeignJMSDestination" Name="MyRemoteQueue1">
    <set attribute="LocalJNDIName" value="MyLocalQueue1JNDI"/>
    <set attribute="RemoteJNDIName" value="MyRemoteQueue1JNDI"/>
    </create>
         </create>
              </wlconfig>
         </target>
    =====================================================================
    This target runs without error in WL 10, but does not create the ForeignJMSConnectionFactory and ForeignJMSDestination.
    If some one knows the solution, please give me advice.
    Thanks,

    Maybe this is of some help: http://www.bea-weblogic.com/namenotfoundexception-when-configuring-foreign-jms-server.html

  • JMS cluster and happen JMS Queue Exception javax.naming.NameAlreadyBoundExc

    Hi,
    Sorry I not sure how to setup JMS cluster in WLS 10.3.2. We have two manager server in two machine. And will join into one cluster. After configure the JMS module & JMS server. We found it only can work in one server. And will faill in another server. And reply the error message as below :
    Any one can help to tell me why one server success. And other is fail !
    javax.naming.NameAlreadyBoundException: JMS_Queue_misdel_a is already bound; rem
    aining name ''
    at weblogic.jndi.internal.BasicNamingNode.bindHere(BasicNamingNode.java:357)
    at weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingNode.java:140)
    at weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:317)
    at weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.jav
    ==> config for JMS
    <jms-server>
    <name>JMS_Server_cim_a</name>
    <target>ebowls05</target>
    <persistent-store xsi:nil="true"></persistent-store>
    <hosting-temporary-destinations>true</hosting-temporary-destinations>
    <temporary-template-resource xsi:nil="true"></temporary-template-resource>
    <temporary-template-name xsi:nil="true"></temporary-template-name>
    <message-buffer-size>-1</message-buffer-size>
    <expiration-scan-interval>30</expiration-scan-interval>
    </jms-server>
    <jms-server>
    <name>JMS_Server_cim_b</name>
    <target>ebowls06</target>
    <persistent-store xsi:nil="true"></persistent-store>
    <hosting-temporary-destinations>true</hosting-temporary-destinations>
    <temporary-template-resource xsi:nil="true"></temporary-template-resource>
    <temporary-template-name xsi:nil="true"></temporary-template-name>
    <message-buffer-size>-1</message-buffer-size>
    <expiration-scan-interval>30</expiration-scan-interval>
    </jms-server>
    <migratable-target>
    <name>ebowls06 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do
    not delete manually.</notes>
    <user-preferred-server>ebowls06</user-preferred-server>
    <cluster>ebouatCluster</cluster>
    </migratable-target>
    <migratable-target>
    <name>ebowls05 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do
    not delete manually.</notes>
    <user-preferred-server>ebowls05</user-preferred-server>
    <cluster>ebouatCluster</cluster>
    </migratable-target>
    <jms-system-resource>
    <name>JMS_ConnFactory_cim</name>
    <target>ebouatCluster</target>
    <descriptor-file-name>jms/JMS_ConnFactory_cim/JMS_ConnFactory_cim-jms.xml</d
    escriptor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Queue_promis</name>
    <target>ebouatCluster</target>
    <sub-deployment>
    <name>JMS_Queue_promis@JMS_Server_cim_a</name>
    <target>JMS_Server_cim_a</target>
    </sub-deployment>
    <sub-deployment>
    <name>JMS_Queue_promis@JMS_Server_cim_b</name>
    <target>JMS_Server_cim_b</target>
    </sub-deployment>
    <descriptor-file-name>jms/JMS_Queue_promis/JMS_Queue_promis-jms.xml</descrip
    tor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Template_cim</name>
    <target>ebouatCluster</target>
    <descriptor-file-name>jms/JMS_Template_cim/JMS_Template_cim-jms.xml</descrip
    tor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Queue_misdel_a</name>
    <target>ebouatCluster</target>
    <sub-deployment>
    <name>JMS_Queue_misdel_a@JMS_Server_cim_a</name>
    <target>JMS_Server_cim_a</target>
    </sub-deployment>
    <sub-deployment>
    <name>JMS_Queue_misdel_a@JMS_Server_cim_b</name>
    <target>JMS_Server_cim_b</target>
    </sub-deployment>
    <descriptor-file-name>jms/JMS_Queue_misdel_a/JMS_Queue_misdel_a-jms.xml</des
    criptor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Queue_misdel_b</name>
    <target>ebouatCluster</target>
    <sub-deployment>
    <name>JMS_Queue_misdel_b@JMS_Server_cim_a</name>
    <target>JMS_Server_cim_a</target>
    </sub-deployment>
    <sub-deployment>
    <name>JMS_Queue_misdel_b@JMS_Server_cim_b</name>
    <target>JMS_Server_cim_b</target>
    </sub-deployment>
    <descriptor-file-name>jms/JMS_Queue_misdel_b/JMS_Queue_misdel_b-jms.xml</des
    criptor-file-name>
    </jms-system-resource>

    1 - JMS clustering is an advanced concept, and, in most cases, uses "distributed queues". In case you haven't already, I highly recommend reading the JMS chapter of the new book "Professional Oracle WebLogic" as well as the related chapters in the JMS Programmer's Guide in the edocs.
    2 - The basic problem below is that you have two different queues that have matching JNDI names, but are in the same cluster.
    3 - The config snippet supplied below does not include the queue configuration. Queue configuration is embedded within the referenced module files.
    4 - Please ensure that you follow configuration best practices, as per: http://download.oracle.com/docs/cd/E15523_01/web.1111/e13738/best_practice.htm#CACJCGHG

  • Upgrade Weblogic 8.1 with JMS 1.1

    Hello,
              I am trying to use a Foreign JMS server that I would like to run within the same JVM are my Weblogic server. The foreign JMS is ActiveMQ and supports JCA. This is especially important for XA connections to be managed by the container.
              However, Weblogic 8.1 uses JMS 1.02b and ActiveMQ uses JMS 1.1. I attempted to replace some of the classes within the weblogic jar with JMS 1.1 classes but I just ran into more issues. Anyone know how to properly upgrade Weblogic 8.1 to use JMS 1.1?
              Thanks,
              Denis.

    You can put a jar of implementation of JMS1.1 in your classpath before the weblogic.jar . This will bypass the implementation of JMS weblogic provides.

  • Is it a complex task to translate between JMS and MQ?

    Hello!
    I wonder if it is a complex task to translate a JMS message (javax.jms.Message) to a MQ message (com.xxx.MQMessage)?
    xxx=I do not remember the package name for MQMessage
    Right now I participate in a project where we need to do this translation.
    (I must admit that I thougt there was no need for a translation. I thought that JMS was transparent to MQ and vice versa. But I guess I was wrong)
    I would love to hear some experiance and perhaps if there is some "best practice", please let me know!
    Best regards
    Fredrik

    antsbull wrote:
    I'm happy for you that you use WebLogic - however WebSphere MQ is the leading messaging technology in the industry. If it is configured correctly it guarantees 100% message retention. You may beg to differ, but you have nothing to back it up with so far - maybe IBM should be sued for false advertising if it is impossible (as you say)?Not really. IBM isn't a very important software company, IMO. They're huge in global services, but they passed leadership in hardware and software off to others decades ago. Or maybe you're one of those people who still lives in the 80s and thinks of IBM as a "leader".
    There's a lot of IBM legacy out there. Banks are still running DB2, but nobody thinks it's a leader in the relational database space. There's a lot of Cobol code with CICS running on mainframes, but surely you're not going to cite that as cutting edge, are you?
    Just curious - do you work for IBM?
    All I know is that MQ is the industry standard, as you can easily discover on google or wikipedia or whatever you want. Wikipedia? Is that your best source? LOL!
    Let's look at Wikipedia, shall we? Your own source tells me that WebSphere is ~40% of the market:
    http://en.wikipedia.org/wiki/MQSeries
    I'm even suspicious of these numbers, because I think they leave out the open source parts of the market. How do you quantify that? # downloads? # of systems in production? I'll bet that survey doesn't exist. And it looks different depending on whether we're talking about large or small companies.
    Why don't you find some links to support your claim? You've done nothing but say "industry leading" and "guarantees 100%". Your "because I said so" isn't convincing, either.
    Come back in a month - I have time.
    Maybe if you are such a messaging expert you would have some reasons why the majority of the industry use MQ and not WebLogic even though WebLogic is supposedly better? Because the entire world isn't IBM anymore.
    I worked on a Ministry of Justice project that used WebLogic application server and its JMS queues for a critical messaging component - and at least once every two weeks the queues would go down and there would be a mad rush to get them back up - this was probably a poorly configured installation of WebLogic, and is only one example, but it left me with a pretty poor opinion of the product.That's fair. I don't know anything about the version or the admins or the servers or even you. But if that's what your experience has been, I can't question it. Maybe I can question the competence of a Ministry of Justice (which country?) that doesn't seem to train their WebLogic and server admins properly. Maybe it's an organizational problem.
    I can say that we have farms of WebLogic running on Solaris servers that are very reliable. I developed one app that faces out to the Internet that uses JMS, and that app hasn't had to come down in almost three years. Reliable enough?
    WebSphere and WebLogic have been neck and neck in the Java EE app server space for a long time, each controlling 35-40% of the market. I think JBOSS and Glassfish are making some inroads there. Spring is making it possible to write enterprise apps that can be deployed on servlet/JSP engines.
    And all of this discussion leaves out Microsoft, .NET, and MSMQ.
    I would believe that MQ series has the lion's share of the middleware/messaging market, but I'd bet that it has less to do with the clear superiority of the product and more to do with the large legacy base that IBM has out there. It's a very old mainframe/COBOL/CICS kind of technology, and the organizations that brought it in tend to be large and conservative.
    You didn't ask any questions about the OP's organization. I think that ought to factor into the discussion.
    Oh, and by the way more than 80% of the companies on the Fortune 100 use WebSphere MQ - maybe you should inform them how rubbish it is?And 76.273% of all statistics are made up on the spot.
    I'm not interested in convincing anybody of anything. It's my opinion that if I had a Java EE app server with JMS on it that I wouldn't bring in IBM's MQ Series just for the sake of having it. If there was a legacy system that I needed to integrate with that demanded I use MQ Series there'd be no question.
    But why does it seem sensible to bring in yet another moving part, another expense, another separate piece to be configured and maintained and upgraded? Applications are hard enough to develop. I wouldn't use MQ Series for its own sake, and I'd challenge anybody who brought it in because "they said so".
    %

  • WLI and JMS and clusters

    Hi,
    We are deploying an HA solution which includes two servers running WLPI and
    two JMS servers. Each JMS server is associated (target) with one WLPI
    server.
    I want to cluster these servers. However, JMS clustering limitations means
    that a given JMS destination can only be defined on one server within the
    cluster. So I need to change the destinations used internally by WLPI in
    order to define the cluster. Is that possible? How? Am I missing something?
    Thanks,
    Philippe
    Philippe Fajeau [email protected]
    System Architect Tel: (604) 484-6675
    Centrata Fax: (604) 685-5252

    Philippe,
    See my response today in weblogic.interest.developers. Yes you can cluster, but
    for high availability you will have to do write you workflows a particular way,
    until the recovery-code in WLI becomes cluster-safe.
    Richard
    "Philippe Fajeau" <[email protected]> wrote:
    Hi,
    We are deploying an HA solution which includes two servers running WLPI
    and
    two JMS servers. Each JMS server is associated (target) with one WLPI
    server.
    I want to cluster these servers. However, JMS clustering limitations
    means
    that a given JMS destination can only be defined on one server within
    the
    cluster. So I need to change the destinations used internally by WLPI
    in
    order to define the cluster. Is that possible? How? Am I missing something?
    Thanks,
    Philippe
    Philippe Fajeau [email protected]
    System Architect Tel: (604) 484-6675
    Centrata Fax: (604) 685-5252

  • Performance between MQ and MQ JMS

    Hi! I now MqSeries is not the subject of this newsgroup, but, as soon as,
    I'm using Weblogic to access MQ JMS queue, I'd like to now the opinion of
    other people about performance in the following environment.
    Our test program runs MQ Series 5.2 and BEA Weblogic 6.1sp2 on Solaris 2.8
    over a E3500(4 cpus@400MHz, 3Gbytes of core memory). The application uses
    the JMS API.
    Tests showed that:
    1.it takes about 150msec for a single thread to read a message from a MQ
    Series queue in transactional context (using XA interface)
    2.when using 5 threads to read the same queue, each thread takes about
    400msec to read a message instead of keeping about the same 150msec
    3.for a non-transactional read, a single thread is capable of reading a
    message in about 50msec and the 5 thread version, in 70msec (still not
    scalling up but not as bad as the transactional version).
    Monitoring MQ using strmqtrc (MQ trace) at API level, we could see that
    between xa_start and MQGET call it took about 300msec (using the 5 thread
    version), apparently doing nothing.
    CPU and I/O seems not to be a problem, at least as far as we could monitor.
    Please see attached logs. The first log is the MQ trace file. The other one
    is the app log which shows, for each thread, the time difference between one
    message and the previous one to the same thread.
    For instance
    0milli (Thread-0)->Starting transaction <-before begin
    transaction
    1milli (Thread-0)->Waiting for message <-after begin tran,
    before read queue
    553milli (Thread-0)->Got incoming msg <-after read
    1milli (Thread-0)->Transaction committing <-before commit
    transaction
    10milli (Thread-0)->Message processing completed. <-after commit
    Are these figures the expected values for this hardware/software
    configuration?
    Regards.
    [weblogic_ispb_20020123_163106.txt]
    [trace.zip]

    Make sure you are using the lwp thread library on Solaris 8 (put
    /usr/lib/lwp FIRST in LD_LIBRARY_PATH - something like that).
    I didn't look too closely at your complete post.
    Mike
    "Roberto Castro" <[email protected]> wrote in message
    news:[email protected]...
    Hi! I now MqSeries is not the subject of this newsgroup, but, as soon as,
    I'm using Weblogic to access MQ JMS queue, I'd like to now the opinion of
    other people about performance in the following environment.
    Our test program runs MQ Series 5.2 and BEA Weblogic 6.1sp2 on Solaris 2.8
    over a E3500(4 cpus@400MHz, 3Gbytes of core memory). The application uses
    the JMS API.
    Tests showed that:
    1.it takes about 150msec for a single thread to read a message from a MQ
    Series queue in transactional context (using XA interface)
    2.when using 5 threads to read the same queue, each thread takes about
    400msec to read a message instead of keeping about the same 150msec
    3.for a non-transactional read, a single thread is capable of reading a
    message in about 50msec and the 5 thread version, in 70msec (still not
    scalling up but not as bad as the transactional version).
    Monitoring MQ using strmqtrc (MQ trace) at API level, we could see that
    between xa_start and MQGET call it took about 300msec (using the 5 thread
    version), apparently doing nothing.
    CPU and I/O seems not to be a problem, at least as far as we couldmonitor.
    >
    Please see attached logs. The first log is the MQ trace file. The otherone
    is the app log which shows, for each thread, the time difference betweenone
    message and the previous one to the same thread.
    For instance
    0milli (Thread-0)->Starting transaction <-before begin
    transaction
    1milli (Thread-0)->Waiting for message <-after begin tran,
    before read queue
    553milli (Thread-0)->Got incoming msg <-after read
    1milli (Thread-0)->Transaction committing <-before commit
    transaction
    10milli (Thread-0)->Message processing completed. <-after commit
    Are these figures the expected values for this hardware/software
    configuration?
    Regards.

Maybe you are looking for

  • Web Gallery Images Don't Show Up On Web

    I am very new to Lightroom, but have been using Dreamweaver and Photoshop for quite a while now. I took about 10 pictures that I wanted to be on a test web gallery, brought them into Lightroom as their own collection, selected them all and went to th

  • Unable to Create Alias Entry

    I have setup a new sever with Comm Suite on it. I recreated the user in the ldap sever and imported their email and calendar data. Everything is working great except one pesky problem. I changed the ldap structure in the new server to o=isp from dc=d

  • Please help! --Question about lauching application by JavaWebStart

    Hi, I am a new user of the Java Web Start technique. When I tried to launch my application by it, I got the error of javaw.exe -- Application error "the instruction" at "0x5006bf974" referenced memory at "0x000000e7f". The memory could not be "read""

  • QT Pro 7.6 image sequencing aperture exports - only reads first file

    I'm exporting versions (jpg) of files that are originally Nikon raw (NEF) format. I'm testing with a bunch of images that were grabbed using the camera's continuous mode - want to make sure the system works before doing any real playing with time lap

  • Is Mac iPhone Data Recovery system support on Mozilla?

    There are many different iPhone Rescue software out there. 321Soft's iPhone Recovery for Mac specializes in recovering photos, videos, and other files that have been deleted on iPhone and iPad, even without these iOS devices.Overall, it does a great