MDB - JMS foreign provider

          Using WLS8.1:
          I'm currently trying to set up a MDB listening directly on a JMS queue, provided
          by Sonic.
          I registered my queue through the Sonic JMS console in the WLS JNDI repository,
          and can browse to the object successfully in the JNDI browser.
          However, when I deploy my MDB, I get an exception:
          <Feb 28, 2004 3:27:09 PM MET> <Warning> <EJB> <BEA-010061> <The Message-Driven
          EJB: SomeMDB is unable to connect to the JMS destination: myforeigndestination.
          The Error was:
          weblogic.jms.common.InvalidDestinationException: Foreign destination, q_external
          weblogic.jms.common.InvalidDestinationException: Foreign destination, q_external
          at weblogic.jms.common.Destination.checkDestinationType(Destination.java:106)
          at weblogic.jms.client.JMSSession.createConsumer(JMSSession.java:1580)
          at weblogic.jms.client.JMSSession.createReceiver(JMSSession.java:1484)
          at weblogic.ejb20.internal.JMSConnectionPoller.setUpQueueSessions(JMSConnectionPoller.java:1609)
          at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:1844)
          at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:1087)
          at weblogic.ejb20.internal.JMSConnectionPoller.trigger(JMSConnectionPoller.java:970)
          at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:243)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
          at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:229)
          at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:223)
          at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:50)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
          The only way to get it working is setting up an additional internal WL queue,
          connected by a Messaging Bridge, but that's not what I want.
          It seems like weblogic JMS implemenation only accepts weblogic Queue's as valid
          Queue objects.
          Thanks for any pointers.
          Rgrds,
          Klaas van der Ploeg
          

          Klaas van der Ploeg wrote:
          > Using WLS8.1:
          >
          > I'm currently trying to set up a MDB listening directly on a JMS queue, provided
          > by Sonic.
          >
          > I registered my queue through the Sonic JMS console in the WLS JNDI repository,
          > and can browse to the object successfully in the JNDI browser.
          > However, when I deploy my MDB, I get an exception:
          > <Feb 28, 2004 3:27:09 PM MET> <Warning> <EJB> <BEA-010061> <The Message-Driven
          > EJB: SomeMDB is unable to connect to the JMS destination: myforeigndestination.
          > The Error was:
          > weblogic.jms.common.InvalidDestinationException: Foreign destination, q_external
          > weblogic.jms.common.InvalidDestinationException: Foreign destination, q_external
          > at weblogic.jms.common.Destination.checkDestinationType(Destination.java:106)
          > at weblogic.jms.client.JMSSession.createConsumer(JMSSession.java:1580)
          > at weblogic.jms.client.JMSSession.createReceiver(JMSSession.java:1484)
          > at weblogic.ejb20.internal.JMSConnectionPoller.setUpQueueSessions(JMSConnectionPoller.java:1609)
          > at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:1844)
          > at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:1087)
          > at weblogic.ejb20.internal.JMSConnectionPoller.trigger(JMSConnectionPoller.java:970)
          > at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:243)
          > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
          > at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
          > at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:229)
          > at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:223)
          > at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:50)
          > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
          > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
          >
          >
          > The only way to get it working is setting up an additional internal WL queue,
          > connected by a Messaging Bridge, but that's not what I want.
          >
          >
          > It seems like weblogic JMS implemenation only accepts weblogic Queue's as valid
          > Queue objects.
          Emphatically not true. In pointed fact, WebLogic has gone through
          great pains over the years to ensure integration works with multiple
          JMS vendors - sending out fix requests to them as needed (including
          Sonic).
          Anyhow, you are trying to use a non-WebLogic destination with a
          WebLogic JMS session. No vendor supports this. Instead, you
          must make sure that the MDB creates a Sonic JMS session. So
          configure a foreign connection factory, and configure the
          MDB to refer to this connection factory. You can find
          this information in WebLogic's JMS developer guide.
          This is the first time I've gotten a Sonic question in quite a
          while, but I know that they have step-by-step doc on how to
          integrate their product with WebLogic. You might want to try
          looking there for more help. I don't know if their doc
          leverages 8.1 foreign destination wrapper feature.
          Tom Barnes, BEA
          >
          > Thanks for any pointers.
          >
          > Rgrds,
          > Klaas van der Ploeg
          

Similar Messages

  • JMS Foreign Provider using XAConnectionFactory for Container Managed Trans

    Hello, we've been running some proof of concepts using Weblogic 10.3 with a JMS Foreign Provider attached to MQSeries 7.
    We created a very simple MDB to read a message and output it's content.
    We created a bindings file with a Connection Factory (without XA)
    The question I have is that when I set the Transaction Management to Container and Transaction Attribute to "Required" , does Weblogic automatically look for a XAQueueConnectionFactory? We get the error below:
    [EJB:011013]The Message-Driven EJB attempted to connect to the JMS connection factory with the JNDI name: OP_CF. However, the object with the JNDI name: OP_CF is not a JMS connection factory. NestedException Message is :com.ibm.mq.jms.MQQueueConnectionFactory cannot be cast to javax.jms.XAConnectionFactory>
    When we set the transacation to Bean Managed or we set to Container Managed but set the attribute to "NotSupported" it works fine.
    My goal is to have a MDB that has Container Managed Transactions and "Requires" Attribute, but only particpates in a local transaction and does not need the overhead of XA. It will read from a Foreign MQ manager Queue, process and then write back to the same Foreign MQ manager(different queue), so only one resource (MQ) is used.
    If we set the above settings, it seems that a XAConnectionFactory is required. Is that true?

    -- If you do not enable the container transaction, then the MDB connection factory does not need to be an XA connection factory.
    -- If the application is performing messaging operations, and wants to use locally managed transactions, then you have a variety of options. These are all standard JMS:
    * Use an XA connection and XA session. Begin JTA transactions before performing JMS operations, and call commit or rollback on the JTA transaction after performing the JMS operations. For foreign vendors, you must take extra steps to ensure that the vendor enlists with the WebLogic transaction -- typically by using WebLogic resource reference wrappers.
    * Use the standard JMS API "transacted session" on a non-XA session -- the transaction will be local to the session (this is extremely similar to JDBC local transactions).
    * Use a non-transacted session. Sends will occur immediately. Receive messages will be acknowledged immediately for auto-ack sessions, or will not for non-ack.
    -- Note that if a transaction only includes a single operation, there's no need for XA or non-transacted sessions.
    -- For more information on transactions and integration, I highly recommend reading our [ Integrating Remote JMS Providers | http://download.oracle.com/docs/cd/E15523_01/web.1111/e13727/interop.htm#JMSPG553 ] FAQ. I also very highly recommend purchasing a copy of [ Professional Oracle WebLogic Server | http://www.amazon.com/Professional-Oracle-WebLogic-Server-Patrick/dp/0470484306/ref=sr_1_1?ie=UTF8&s=books&qid=1252088885&sr=8-1 ], and of course reviewing our [ JMS Information Roadmap | http://download.oracle.com/docs/cd/E15523_01/web.1111/e14529/messaging.htm#sthref23 ].
    -- Finally, you may also want to consider replacing some MQ usage with WebLogic JMS. WL JMS is a heavily adopted messaging vendor, and for obvious reasons, tends to integrate especially well with the WebLogic app server.
    Hope this helps,
    Tom

  • [EJB:010112] - error with WLI8.1 Event Generator for foreign JMS/MQ provider

    I'm getting following error in weblogic server log when starting a JMS Event generator
    to a foreign JMS(MQ5.3) Queue.
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010096> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. Connection failed after 2 attempts. The MDB will attempt to reconnect
    every 10 seconds. This log message will repeat every 600 seconds until the condi
    tion clears.>
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010061> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. The Error was:
    [EJB:010112]The Message Driven Bean 'mqQueueEventGen' is transacted, but the pro
    vider defined in the EJB is not transacted. Provider should be transacted if onM
    essage method in MDB is transacted.>
    My WLI8.1.2 is patched with CR131686_812.zip to support event generator for foreign
    JMS destinations. The foreign JMS/MQ provider is configured properly. QueueSend/Receive
    were tested fine with JMS java code using local JNDI names of foreign JMS objects.
    So we know that foreign Queue is active and accessiable from webLogic.
    Anyone run into this? Solution?
    Thanks,
    Scott

    Hi Scott,
    I need a transaction from the MDB since I am not using an EJb to pursue the action.
    Hence I need to retain the <trans-attribute>Required</trans-attribute> at the
    MDB.
    Have any answers?
    Pradip
    "Scott Yen" <[email protected]> wrote:
    >
    It's resolved.
    The MDB automatically created by JMS Event Generator defaults to be deployed
    with
    “transacted”. That requires the foreign JMS provider to be “XA”.
    The deployment descriptor is created as <domain-directory>/WLIJmsEG_<event_gen_name>.jar
    e.g. C:\bea812\user_projects\domains\jmsInterop\WLIJmsEG_mqQueueEventGen.jar
    Since MQ in the localhost and remote SLUDV18 are not XA-enabled, we had
    to manually
    change the <container-transaction> section in ejb-jar.xml:
    From :
    <trans-attribute>Required</trans-attribute>
    To:
    <trans-attribute>NotSupported</trans-attribute>
    "Scott Yen" <[email protected]> wrote:
    I'm getting following error in weblogic server log when starting a JMS
    Event generator
    to a foreign JMS(MQ5.3) Queue.
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010096> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. Connection failed after 2 attempts. The MDB will attempt to
    reconnect
    every 10 seconds. This log message will repeat every 600 seconds until
    the condi
    tion clears.>
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010061> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. The Error was:
    [EJB:010112]The Message Driven Bean 'mqQueueEventGen' is transacted,
    but the pro
    vider defined in the EJB is not transacted. Provider should be transacted
    if onM
    essage method in MDB is transacted.>
    My WLI8.1.2 is patched with CR131686_812.zip to support event generator
    for foreign
    JMS destinations. The foreign JMS/MQ provider is configured properly.
    QueueSend/Receive
    were tested fine with JMS java code using local JNDI names of foreign
    JMS objects.
    So we know that foreign Queue is active and accessiable from webLogic.
    Anyone run into this? Solution?
    Thanks,
    Scott

  • Distributed destination with MQ as Foreign Provider

    Hi
              Messages arrive in a set of clustered MQ Series Queues. MDBs process the messages (We use MQ as the Foreign JMS Provider). Can I set up a distributed destination (JMS Queues) in WebLogic and use those clustered MQ queues as the Foreign Provider ? I would like the MQ Series clustering to provide the redundancy/availability of the MQ Series system and the JMS distributed destination to provide high availability for the MDBs that are hosted in a set of clustered WebLogic server instances.
              Thanks

    Hi          > Messages arrive in a set of clustered MQ Series
              > Queues. MDBs process the messages (We use MQ as the
              > Foreign JMS Provider). Can I set up a distributed
              > destination (JMS Queues) in WebLogic and use those
              > clustered MQ queues as the Foreign Provider ?
              No. WL distributed destinations consist only of a set of physical WL destinations. The WL distributed destination code does not support non-WL destinations.
              > I would
              > like the MQ Series clustering to provide the
              > redundancy/availability of the MQ Series system and
              > the JMS distributed destination to provide high
              > availability for the MDBs that are hosted in a set of
              > clustered WebLogic server instances.
              If MQ Series exposes its distributed destination via the standard JMS API, then the MDBs will automatically run as MQ distributed dest clients. This is a function of MQ, not WL -- WL MDBs simply use the standard JMS API of the vendor's supplied client to get their messages.
              But note that WL MDBs use a single connection per MDB pool/deployment. Some clustering implementations (MQ?) require using multiple connections...
              >
              > Thanks

  • Error initializing the Oracle JMS Resource provider for Topics

    Getting this error when starting OC4J 9.0.3 standlone on Windows2000.
    Resource provider config'd as
    <resource-provider class="oracle.jms.OjmsContext" name="ojms">
    <description> OJMS/AQ </description>
    <property name="datasource" value="jdbc/ProlianceDS"></property>
    </resource-provider>
    Datasource config'd as
         <data-source
              class="com.evermind.sql.OrionCMTDataSource"
              name="ProlianceDS"
              location="jdbc/ProlianceDS"
              xa-location="jdbc/xa/ProlianceDS"
              ejb-location="jdbc/ProlianceDS"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username="proliance"
              password="******"
              url="jdbc:oracle:thin:@aps67.ere.com:1538:ifstst"
              inactivity-timeout="30"
         />
    ejb-jar config'd as
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <description>Proliance Message Driven Bean</description>
    <display-name>ProlianceMDB</display-name>
    <ejb-name>ProlianceMDB</ejb-name>
    <ejb-class>com.lendlease.bll.ProlianceMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-selector>
    <method>
    <ejb-name>ProlianceMDB</ejb-name>
    <method-name>onMessage</method-name>
    </method>
    </message-selector>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>Durable</subscription-durability>
    </message-driven-destination>
    <resource-ref>
    <res-ref-name>java:comp/resource/ojms/Topics/PROLIANCE.OUT_AQ</res-ref-name>
    <res-type>javax.jms.Topic</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>java:comp/resource/ojms/TopicConnectionFactories/aqTcf</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.TopicConnectionFactory</resource-env-ref-type>
    </resource-env-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>ProlianceMDB</ejb-name>
    <method-name>onMessage</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    orion-ejb-jar config'd as:
    <?xml version = '1.0'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar deployment-time="e7f1ce76f6" deployment-version="1.0.2.2">
    <enterprise-beans>
    <message-driven-deployment
    name="ProlianceMDB"
    connection-factory-location="java:comp/resource/ojms/TopicConnectionFactories/aqTcf"
    destination-location="java:comp/resource/ojms/Topics/PROLIANCE.OUT_AQ"
    subscription-name="PROLIANCE_SUBSCRIBER">
    </message-driven-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    Full startup trace is:
    C:\ora\oc4j_9.0.3\j2ee\home>java -Djdbc.connection.debug=true -jar oc4j.jar
    Node started with id=-2143203582
    Auto-unpacking C:\ora\oc4j_9.0.3\j2ee\home\applications\ProlianceMDB.ear... done.
    Auto-unpacking C:\ora\oc4j_9.0.3\j2ee\home\applications\ProlianceMDB\ProlianceMDB.war... done.
    Auto-deploying ProlianceMDB (New server version detected)...
    Copying default deployment descriptor from archive at C:\ora\oc4j_9.0.3\j2ee\home\applications\ProlianceMDB/ProlianceMDB
    .jar/META-INF/orion-ejb-jar.xml to deployment directory C:\ora\oc4j_9.0.3\j2ee\home\application-deployments\ProlianceMDB
    \ProlianceMDB.jar...
    Auto-deploying ProlianceMDB.jar (New server version detected)... done.
    Error initializing the Oracle JMS Resource provider for Topics: Not an OracleConnection
    Error deploying file:/C:/ora/oc4j_9.0.3/j2ee/home/applications/ProlianceMDB/ProlianceMDB.jar homes: No javax.jms.Destina
    tion found at the specified destination-location (java:comp/resource/ojms/Topics/PROLIANCE.OUT_AQ) for MessageDrivenBean
    ProlianceMDB
    OrionCMTConnection not closed, check your code!
    Logical connection not closed, check your code!
    Created at:
    java.lang.Throwable: OrionCMTConnection created
    at com.evermind.sql.OrionCMTConnection.<init>(OrionCMTConnection.java:42)
    at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:82)
    at oracle.jms.AQjmsConnection.newDBConnection(AQjmsConnection.java:1681)
    at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:537)
    at oracle.jms.AQjmsTopicConnectionFactory.createTopicConnection(AQjmsTopicConnectionFactory.java:232)
    at oracle.jms.OjmsResource.initT(OjmsResource.java:512)
    at oracle.jms.OjmsResource.initAQ(OjmsResource.java:411)
    at oracle.jms.OjmsResource.init(OjmsResource.java:214)
    at oracle.jms.OjmsContextFactory.getObjectInstance(OjmsContextFactory.java:103)
    at oracle.jms.OjmsContext.getResource(OjmsContext.java:328)
    at com.evermind.server.Application.lookupResource(Application.java:2548)
    at com.evermind.server.Application.lookupResource(Application.java:2563)
    at com.evermind.server.ApplicationContext.handleResourceLookup(ApplicationContext.java:639)
    at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:162)
    at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:66)
    at com.evermind.server.ejb.MessageDrivenHome.<init>(MessageDrivenHome.java:236)
    at com.evermind.server.ejb.EJBPackageDeployment.bindHomes(EJBPackageDeployment.java:304)
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:595)
    at com.evermind.server.Application.postInit(Application.java:431)
    at com.evermind.server.Application.setConfig(Application.java:136)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1635)
    at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1585)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1240)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
    at java.lang.Thread.run(Thread.java:484)
    Auto-deploying ProlianceMDB Poster (New server version detected)...
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
    Using native aqapi.jar with OC4J -didn't copy from 9.2.0.2 DB. 9.2.0.2 patchset ran fully, completed fine. What's going wrong?
    Brian

    Shouldn't I be getting a com.evermind.sql.OrclCMTConnection created instead of a com.evermind.sql.OrionCMTConnection (per the stack trace)? OJMS is complaining that it doesn't have an OracleCOnnection but how do I tell it to use the "OrclCMTConnection" class instead?
    Brian

  • Doubt on using DB as JMS resource provider

    Hi
    I am trying to use Oracle DB as JMS resource provider. I am trying to create required tables like following.
    connect as sysdba/pwd
    CREATE USER TUSER IDENTIFIED BY tiger
    GRANT CONNECT, RESOURCE,AQ_ADMINISTRATOR_ROLE TO TUSER
    GRANT EXECUTE ON SYS.DBMS_AQ TO TUSER // Hanging
    In line 3 it never completes. Looks like some lock is there on that table, But I am not able to understand what lock.
    Can anybody explain me what could be wrong. (I am not DBA. Just trying to learn JMS using DB as resource provider. I am using the DB which comes with Infra)
    Thanks
    Ratheesh

    Which database version is this? The hang is likely caused by a lock held on the dbms_aq package. For example, when a session is blocked inside dbms_aq package wating for messages to be delivered, it is not possble to grant/revoke execute permissions on that package to a different db user.
    You could try bouncing the db to see if you still see the hang.
    Hope this helps,
    -Frances

  • How can i make Tomcat work as JMS message Provider?

    i've installed Tomcat on my windows 2000. but how can i make it works as a JMS message provider? pls help!

    Tomcat only implements the Servlet and JSP specifications, not JMS. See JBoss.org or SwiftMQ, or OpenJMS, etc.

  • MDB with foreign JMS : WLS 9.23

    For the love of _____ (fill in your own muse of desperation here), is there some categorical statement of whether WLS9.23 actually ***works*** with MDB's and foreign JMS providers? Whereever I search/find, people have trouble with this.
              Some kind BEA sould - please. Please, please please : publish a canonical example of MDB with secured foreign-JNDI provided connx factory, and either a queue or a topic.
              I'm beginning to wonder if this works at all.

    Good morning!
              Categorical Statement: WLS supports JMS spec compliant foreign providers for MDBs, bridges, resource-references, foreign providers. We also support sending a foreign providers message using a WebLogic JMS client.
              For general Tibco integration questions, I recall that the Tibco docs themselves contain WebLogic integration examples. There's also some much mention of Tibco in the out-dated "Using Foreign JMS Providers with WebLogic Server" white-paper on dev2dev.
              That said, there have been definitely been problems with Tibco and MQ's latest release, as they both recently released semi-non-JMS compliant clients that our wrapper code was unprepared to deal with. In short, we were caught unawares when these clients stopped supporting the 1.0.2 APIs even though 1.1 specification clearly requires both 1.1 and 1.0.2 support. Rather than ask Tibco and MQ teams to have them patch their code (an approach we've sometimes taken over the years), we chose this time to enhance our code.
              I think the problems were all fixed by 9.23 - but you may want to contact customer support to see if there are any additional patches required. Alternatively, you can try use a slightly older Tibco client, as presumably their older clients are still able to interoperate with their latest server version (this approach works with MQ).
              Tom

  • MDB for Foreign JMS server

    I am trying to access MQ que with Message Driven bean in weblogic 8.1.
              I have defined Foreign JMS server in weblogic pointing to MQ JNDI name.
              I am not sure what to define in "weblogic-ejb-jar.xml" and "ejb-jar.xml" to refer to que connection factory and que.
              Error message that I am getting while deploying is as follows:
              <The Message-Driven EJB: MesssageHandlerBean is unable to connect to the JMS destination: jms.MediaQueue. The Error was:
              [EJB:011010]The JMS destination with the JNDI name: jms.MediaQueue could not be found. Please ensure that the JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination has been deployed.>
              Looks like it weblogic is not able to identify JNDI name that I have defined in foreign server for remote que.
              Please let me know how i can reference foreign JMS server JNDI names.
              Thanks a bunch for help.
              Please find attached configuration files.
              weblogic-ejb-jar.xml
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>MesssageHandlerBean</ejb-name>
              <message-driven-descriptor>
              <destination-jndi-name>
              jms.MediaQueue
              </destination-jndi-name>
              <initial-context-factory>
              com.sun.jndi.fscontext.RefFSContextFactory
              </initial-context-factory>
              <provider-url>file://localhost/d:/mqm</provider-url>
              <connection-factory-jndi-name>
              jms.MediaQcf
              </connection-factory-jndi-name>
              </message-driven-descriptor>
              <jndi-name>MesssageHandlerBean</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ejb-jar.xml
              <enterprise-beans>      
              <message-driven>
              <ejb-name>MesssageHandlerBean</ejb-name>
              <ejb-class>com.ejb.MesssageHandlerBean</ejb-class>
              <transaction-type>Container</transaction-type>
              <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
              </message-driven-destination>
              </message-driven>
              </enterprise-beans>
              weblogic "config.xml" for foeign JMS server.
              <ForeignJMSServer ConnectionURL="file://localhost/d:/mqm" InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
              JNDIProperties="" Name="MQJMS Server" Targets="cgServer">
              <ForeignJMSConnectionFactory LocalJNDIName="jms.MediaQcf"
              Name="MQ JMS Connection Factory" PasswordEncrypted=""
              RemoteJNDIName="jms/lMediaQcf" Username=""/>
              <ForeignJMSDestination LocalJNDIName="jms.MediaQueue"
              Name="MQJMS Destination" RemoteJNDIName="jms/IMediaQueue"/>
              </ForeignJMSServer>
              Message was edited by:
              [email protected]
              Message was edited by:
              [email protected]

    Thanks for going over the problem it is resolved now by changing weblogic-ejb-jar.xml. To point to weblogic initial context factory. Since weblogic has a foreign server defined so MDB is able to read from MQ que.
              Thanks
              Akash
              <weblogic-enterprise-bean> <ejb-name>MesssageHandlerBean</ejb-name> <message-driven-descriptor> <destination-jndi-name>jms.MediaQueue</destination-jndi-name> <initial-context-factory> weblogic.jndi.WLInitialContextFactory</initial-context-factory> <provider-url>t3://localhost:7001</provider-url> <connection-factory-jndi-name>jms.MediaQcf</connection-factory-jndi-name> </message-driven-descriptor> <jndi-name>MesssageHandlerBean</jndi-name> </weblogic-enterprise-bean>

  • JMS: foreign servers vs. bridge

    hello,
    any suggestions when to use wls jms bridge e.g. for talking to Sonic or MQ or when to use a foreign jms server definitions? all informations that clarify the conceptual differences between the two solutions are appreciated.
    since what version a foreign jms server is available?
    thanks.
    b.

    For help choosing among the various JMS integration options, I recommend starting with the "Integrating Remote JMS Providers FAQ" at [http://edocs.bea.com/wls/docs103/jms/interop.html].
    In addition, specifically for MQ integration, you might want to check out this blog post "Integrating WebSphere MQ 6 with BEA Weblogic Server 10 using Weblogic Server's Foreign (JMS) Server feature:" at [http://ibswings.blogspot.com/2008/02/integrating-mq-broker-6-with-bea.html].
    As for Sonic integration, I recall that their docs used to provide step-by-step directions for integrating with WebLogic -- I don't know if they still do that with the latest versions.
    MDBs and bridges have been around since 6.1, foreign Servers since 8.1, and SAF (for WL to WL interop) since 9.0.
    Hope this helps,
    Tom

  • Weblogic: problem with JMS foreign server and Transaction

    Hello everyone,
    I am working with an enterprise application with Web Application Server Logic 10.3. L 'application uses the following components:
    1) MDB 2.0
    2) FOREIGN JMS SERVER -> WebSpereMQ
    3) EJB SESSION
    L 'MDB calls the session bean which uses in its ejb-jar.xml using a Wrapper for JMS QueueConnectionFactory with res-ref:
    <resource- ref>
    <res-ref-name> jms / iss / QCFIXP </ res-ref-name>
    <res-auth> Container </ res-auth>
    <res-sharing -scope> Shareable </ res-sharing-scope>
    <resource- ref>
    The MDB is CMT
    <transaction-type> Container </ transaction-type>
    while the session bean is BMT
    <transaction-type> Bean </ transaction-type>
    to call the QCFIXP in its transaction.
    The QCFIXP ii an XA resource
    When there is a rollback operation in SessionBean also in 'MDB
    There 'an operation setRollbackOnly:
    getMessageDrivenContext (). setRollbackOnly ();
    After this operation on the MDB I do a JNDI look up the QueueConnectionFactory but sending the message on a queue I get the following exception:
    javax.jms.JMSException: [JMSPool: 169809] An error occurred while registering the JMS connection with JTA:
    But if not using the "wrapper jms" in the session bean I did not take any exception and the application don' t have any error.
    My doubt is :
    Why if I use the JMS wrapper I get an error javax.jms.JMSException: [JMSPool: 169809] An error occurred while registering the JMS connection with JTA?
    Thanks in advance.
    Michele
    Edited by: user3501731 on 11-mag-2011 3.16

    Hi Tom,
    Thanks very much for your responses and careful analysis you've done.
    Following the source code of the MDB where error occurs.
    Marked In bold the line where the exception is thrown.
         public void onMessage(Message msg) {
    //          Utility.logger(AP.DEBUG, "Partito MDB 2");
              processa(msg);
              protected void processa(Message msg) {
              Utility.logger(
                   AP.DEBUG,
                   "IXPReceiverMDB7.processa(Message msg) partito");
              try {
                   long start = System.currentTimeMillis();
    /*               Utility.logger(
                        AP.DEBUG,
                        "IXPReceiverMDB.processa(Message msg) effettuo lookup");*/
                   ejb = myEjbLocalHome.create();
                   // individuo l'identificativo del messaggio in ricezione
                   String msgid = msg.getJMSMessageID();
                   Utility.logger(
                        AP.DEBUG,
                        "IXPReceiverMDB7.processa(Message msg) elaboro messaggio:"
                             + msgid);
                   String charset = msg.getStringProperty("JMS_IBM_Character_Set");
                   Utility.logger(
                        AP.DEBUG,
                        "IXPReceiverMDB7.processa Charset:" + charset );
                   // invoco il processo di ricezione
                   boolean commitRequested = ejb.processa(ctlReq, encoding, msg);
                   // il valore di ritorno del processo di ricezione identifica o meno
                   // la necessita' di effettuare il rollback dell'intero processo
                   if (!commitRequested) {
                        getMessageDrivenContext().setRollbackOnly();
                   if (ctlReq) {
                        Utility.logger(
                             AP.INFO,
                             "IXPReceiverMDB7.processa(Message msg) spedisco il messaggio pilota del 'cleaning' con JMSCorrelationID = '"
                                  + msgid
                                  + "'");
                        msg.setJMSCorrelationID(msgid);
                        // Viene creata la QueueConnection
                        QueueConnectionFactory factory =
                             JmsFactoryDispenser.getSingleton().getFactory();
                        QueueConnection connection = factory.createQueueConnection();
                        // Viene ottenuta la 'session'
                        QueueSession session =
                             connection.createQueueSession(
                                  false,
                                  Session.AUTO_ACKNOWLEDGE);
                        // spedisco il messaggio sulla coda abbinata al processo di 'cleaning'
                        // della coda di controllo
                        IXPMessageManager msgManager = new IXPMessageManager(session);
                        msgManager.spedisci(msg, AP.PILOTQUEUE, "J", AP.STD_MESSAGE);                    session.close();
                        connection.close();
                   long end = System.currentTimeMillis();
                   Long durata = new Long (end - start);
                   Utility.logger(
                        AP.INFO,
                        "IXPReceiverMDB7 Tempo totale elaborazione messaggio: " +
                        msgid + " " +
                        durata.toString() + " mill" );
                   Utility.logger(
                        AP.DEBUG,
                        "IXPReceiverMDB7.processa(Message msg) terminato");
              } catch (Throwable e) {
                   getMessageDrivenContext().setRollbackOnly();
                   try {
                        Utility.myExceptionHandler(
                             "E",
                             "1",
                             "4028",
                             "IXPReceiverMDB.onMessage()",
                             e);
                   } catch (Throwable ex) {
                        ex.printStackTrace();
    Thanks in advance.
    Edited by: serpichetto on 16-mag-2011 1.24

  • Help setting up my first MDB JMS in websphere studio

    Hello gurus,
    In my servlet I have set the connection factory name to "jms/QCF" and queue to "jms/Q".
    * Under JMS tab I set the JMS Provider to MQ Simulator for Java Developers.
    * I set JMS Connection Factories name to jms/QCF and jndi value to jms/QCF.
    * Under JMS Destinations I set the Queue name to Q and jndi name to jms/Q
    * Under JMS Server Properties I added a queue Q since I set the Queue name to Q above.
    I send the message using QueueSender but the MDB is not receiving it..
    In my MDB I just have a print statement in the onMessage method but its not being fired..
    What am I doing wrong?
    Please help.

    Hello gurus,
    In my servlet I have set the connection factory name to "jms/QCF" and queue to "jms/Q".
    * Under JMS tab I set the JMS Provider to MQ Simulator for Java Developers.
    * I set JMS Connection Factories name to jms/QCF and jndi value to jms/QCF.
    * Under JMS Destinations I set the Queue name to Q and jndi name to jms/Q
    * Under JMS Server Properties I added a queue Q since I set the Queue name to Q above.
    I send the message using QueueSender but the MDB is not receiving it..
    In my MDB I just have a print statement in the onMessage method but its not being fired..
    What am I doing wrong?
    Please help.

  • Oracle AS 10.1.3 - OEMS JMS Database Provider

    Hi,
    Can anyone confirm that the integration between AQ and JMS in Oracle AS 10.1.3 is two-way?
    In other words:
    1) If I publish a message on a JMS topic/queue backed by Oracle AQ, the message is persisted in the database.
    2) If I publish a message on an AQ topic/queue (via e.g. a PL/SQL trigger) this message is published to all subscribers (eg an MDB) of the accompanying JMS topic/queue.
    If so (if the integration between AQ and JMS is two-way), is it sufficient to deploy/configure only one instance of the OEMS JMS Database Message Service Provider in the Oracle AS 10.1.3 EM to achieve this two-way integration?
    Thanks,
    Ronald

    To give a little more background, we're using publish/subscribe to decouple integration between processes in a SOA (and EDA) environment. We'd like to implement publish/subscribe via JMS topics, a.o. since this is a (Java) standard.
    I can't imagine that AQ and JMS cannot be connected both ways. We only run into technical problems (when not :-) when trying to use/configure JMS adapters in ESB and BPEL which are backed by AQ on which messages are enqueued.
    Regards,
    Ronald

  • Monitor JMS Foreign Server

    Hi,
              I have configured the IBM MQ server as a foreign server in one of the JMS Module of WLS9.1. I am able to identify it using JMX (MBeans).(I thought this was a good approach if u have any other approach for it? reply me).
              Now i want to monitor the Foreign Server i.e. capture the Foreign Server status whether the server is active or not and accordingly deploy/undeploy the Foreign Server.
              Can anyone go through this and reply me with the solution? PLzzzzzzzzzz its very urgent

    A "foreign server" is stateless configuration code that simply maps an application's JNDI lookup request into another vendor's JNDI context. It provides no monitoring.
              If you want to determine the status of the server that a foreign server references, you need to either (A) monitor the foreign server directly or (B) monitor the status of an application or service that depends on the foreign server.
              Tom

  • Problems setting up foreign provider

    Hi, I'm trying to get my Weblogic 8.1 server to talk to a remote Websphere server (this is the trial installation of WS so it's not a full version of MQ).
              Basically I set up a connection factory and topic on the websphere machine. THen in Weblogic I created a foreign server containing the initial context factory com.ibm.websphere.naming.WsnInitialContextFactory and the provider url iiop://xxx.xx.xx.xx:2809 (no user/password). Then I proceded to setup a connection factory and a topic.
              I have a stand-alone client running outside the server that tries to connect to the local name of the foreign connection factory but I get an InvalidName exception when it tries to look up the connection factory. From teh stack trace it looks like it is actually trying to look it up on the foreign server but failing.
              portion of config.xml that defines the foreign JMS server:
              <ForeignJMSServer ConnectionURL="iiop://10.0.00.00:2809"
              InitialContextFactory="com.ibm.websphere.naming.WsnInitialContextFactory"
              JNDIProperties="" Name="websphere" Targets="myServer">
              <ForeignJMSConnectionFactory LocalJNDIName="com.abc.def.WSCF"
              Name="Websphere CF" RemoteJNDIName="com.abc.def.connectionFactory"/>
              <ForeignJMSDestination LocalJNDIName="com.abc.def.WSXYZ"
              Name="WSXYZ" RemoteJNDIName="XYZ"/>
              </ForeignJMSServer>
              In the code I set up the initial context with a provider URL that points to the local server (same machine actually) and the standard weblogic initial context factory class.
              The code is very simple JMS client code that works when talking to the local server with a normal connection factory etc and a local topic but when I change the connection factory to "com.abc.def.WSCF" and the topic to "com.abc.def.WSXYZ" I get the following error:
              javax.naming.InvalidNameException: Exception in lookup. [Root exception is org.omg.CosNaming.NamingContextPackage.InvalidName: IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0]
              at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:47)
              at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:235)
              at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:171)
              at javax.naming.InitialContext.lookup(InitialContext.java:347)
              at kmr.jms.PublishToTopic.main(PublishToTopic.java:95)
              Caused by: org.omg.CosNaming.NamingContextPackage.InvalidName: IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0
              at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:187)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
              at weblogic.corba.cos.naming.NamingContextAny_IIOP_WLStub.resolve_any(Unknown Source)
              at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:213)
              ... 3 more
              Caused by: org.omg.CosNaming.NamingContextPackage.InvalidName: IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0 IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0
              at org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(InvalidNameHelper.java:60)
              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:324)
              at weblogic.iiop.IIOPInputStream.readWithHelper(IIOPInputStream.java:2071)
              at weblogic.iiop.IIOPInputStream.read_IDLEntity(IIOPInputStream.java:2060)
              at weblogic.iiop.IIOPInputStream.read_IDLEntity(IIOPInputStream.java:2051)
              at weblogic.iiop.ReplyMessage.getThrowable(ReplyMessage.java:360)
              at weblogic.iiop.InboundResponseImpl.getThrowable(InboundResponseImpl.java:59)
              at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:174)
              ... 7 more
              I took the iiop stuff in the stack trace to mean that it is actually trying to go over to the websphere server and do the lookup but it's not working for some reason...
              Can anybody give me some suggestions on what to try??

    Thanks for the response Tom. Here is the classpath:
              /h/COTS/BEAPLT/weblogic81/server/lib/webservices.jar:/h/COTS/BEAPLT/weblogic81/server/lib/ejbgen.jar::::/h/COTS/BEAPLT/weblogic81/common/eval/pointbase/lib/pbserver44.jar:/h/COTS/BEAPLT/weblogic81/common/eval/pointbase/lib/pbclient44.jar:/h/COTS/BEAPLT/weblogic81/common/eval/pointbase/lib/pbtools44.jar::/utils_common.jar:/h/COTS/BEAPLT/jdk142_06/lib/tools.jar:/h/COTS/BEAPLT/weblogic81/server/lib/weblogic_sp.jar:/h/COTS/BEAPLT/weblogic81/server/lib/weblogic.jar
              wlclient.jar is the thin one right? I don't see any here that are thin and the thick one is at the end.
              Also, I'm using "t3://localhost:80" for the provider url into weblogic (I know 80 is not default but this server was configured ot use 80 for some reason).
              Thanks again for the response - any addtnl info is greatly appreciated.

Maybe you are looking for