MDB connecting to Foreign JMS server in WL8.1

Hello,
          I have this problem that I am hoping someone can help me with. There is a
          MDB deployed in a local WL8.1 that is trying to connect to a Foreign JMS
          Server which is also a WL8.1 running in a remote server. This MDB is
          attempting to subscribe to a topic hosted by that foreign server. In the
          local WL8.1 I created a Foreign JMS Server via the adminconsole and mapped
          the connection factory as well as destinations to the Foreign JMS Server.
          The MDB (via its deployment descriptor) only refers to the local JNDI names
          of the ConnectionFactory and Topic. Here are the scenarios concerning
          security:
          1) When security is turned off (user is in group everyone) everything works
          fine. Messages published to the foreign Topic are received by the MDB in
          the local WL8.1 server and processed.
          2) When a security policy is applied to the Topic (via the remote
          adminconsole), the MDB in the local server gets a 'permission denied'. I
          now have to get around this by defining a principle for the MDB to run as
          and to map the credentials of this principle to that of the user in the
          remote environment with access permissions to the Topic.
          3) When I specify the security identity of my MDB, its JNDI lookup of the
          Topic fails with 'not found'.
          4) Even when the security policy in the remote server is reverted back to
          'everyone' (effectively turning security off) but leaving the MDB running as
          the security principle, it still cannot find the Topic.
          I hope this is something that people have seen and dealt with before.
          Thanks for any and all help anyone can provide. I have also included the
          deployment descriptors for this MDB:
          <ejb-jar>
          <enterprise-beans>
          <message-driven>
          <ejb-name>MDB</ejb-name>
          <ejb-class>sample.class.MDB</ejb-class>
          <transaction-type>Container</transaction-type>
          <message-driven-destination>
          <destination-type>javax.jms.Topic</destination-type>
          </message-driven-destination>
          <security-identity>
          <run-as>
          <role-name>OutsideJMSUser</role-name>
          </run-as>
          </security-identity>
          </message-driven>
          </enterprise-beans>
          <assembly-descriptor>
          <security-role>
          <role-name>OutsideJMSUser</role-name>
          </security-role>
          </assembly-descriptor>
          </ejb-jar>
          <weblogic-ejb-jar>
          <weblogic-enterprise-bean>
          <ejb-name>MDB</ejb-name>
          <message-driven-descriptor>
          <pool>
          <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
          </pool>
          <destination-jndi-name>ForeignTopic</destination-jndi-name>
          <connection-factory-jndi-name>ForeignConnectionFactory</connection-factory-j
          ndi-name>
          </message-driven-descriptor>
          <jndi-name>MDB</jndi-name>
          </weblogic-enterprise-bean>
          <security-role-assignment>
          <role-name>OutsideJMSUser</role-name>
          <principal-name>OutsideJMSUser</principal-name>
          </security-role-assignment>
          </weblogic-ejb-jar>
          

Thanks for the suggestion Greg. I have enabled trust between the two
          domains and that has certainly cut down the variations of SecurityExceptions
          that I get. Now I am consistently only getting a JMSSecurityException with
          a access denied to the topic. I believe I have the credential mapped
          correctly between the run-as local user and the remote authorized user.
          Unfortunately the exception does not specify what username was rejected, it
          would have been useful in determining the next debugging step to take.
          I think you're right, I should engage the security forum for this. Thanks
          again for the help.
          "Greg Brail" <[email protected]> wrote in message
          news:[email protected]...
          > Hmm. The security people (on weblogic.developer.interest.security) might
          > have to help you here, too. When you set the "runAs" identity for the MDB,
          > it's doing everything, including the JNDI lookup, under that identity. So
          if
          > that identity is one that's recognized by the remote domain, then you
          should
          > be OK. One way to make your local identity recognized by the remote domain
          > is to make your domains trusted, but you may wish not to do that.
          >
          > greg
          >
          > "Steve Chan" <[email protected]> wrote in message
          > news:[email protected]...
          > > Hello,
          > >
          > > I have this problem that I am hoping someone can help me with. There is
          a
          > > MDB deployed in a local WL8.1 that is trying to connect to a Foreign JMS
          > > Server which is also a WL8.1 running in a remote server. This MDB is
          > > attempting to subscribe to a topic hosted by that foreign server. In
          the
          > > local WL8.1 I created a Foreign JMS Server via the adminconsole and
          mapped
          > > the connection factory as well as destinations to the Foreign JMS
          Server.
          > > The MDB (via its deployment descriptor) only refers to the local JNDI
          > names
          > > of the ConnectionFactory and Topic. Here are the scenarios concerning
          > > security:
          > >
          > > 1) When security is turned off (user is in group everyone) everything
          > works
          > > fine. Messages published to the foreign Topic are received by the MDB
          in
          > > the local WL8.1 server and processed.
          > >
          > > 2) When a security policy is applied to the Topic (via the remote
          > > adminconsole), the MDB in the local server gets a 'permission denied'.
          I
          > > now have to get around this by defining a principle for the MDB to run
          as
          > > and to map the credentials of this principle to that of the user in the
          > > remote environment with access permissions to the Topic.
          > >
          > > 3) When I specify the security identity of my MDB, its JNDI lookup of
          the
          > > Topic fails with 'not found'.
          > >
          > > 4) Even when the security policy in the remote server is reverted back
          to
          > > 'everyone' (effectively turning security off) but leaving the MDB
          running
          > as
          > > the security principle, it still cannot find the Topic.
          > >
          > > I hope this is something that people have seen and dealt with before.
          > > Thanks for any and all help anyone can provide. I have also included
          the
          > > deployment descriptors for this MDB:
          > >
          > > <ejb-jar>
          > > <enterprise-beans>
          > > <message-driven>
          > > <ejb-name>MDB</ejb-name>
          > > <ejb-class>sample.class.MDB</ejb-class>
          > > <transaction-type>Container</transaction-type>
          > > <message-driven-destination>
          > > <destination-type>javax.jms.Topic</destination-type>
          > > </message-driven-destination>
          > > <security-identity>
          > > <run-as>
          > > <role-name>OutsideJMSUser</role-name>
          > > </run-as>
          > > </security-identity>
          > > </message-driven>
          > > </enterprise-beans>
          > >
          > > <assembly-descriptor>
          > > <security-role>
          > > <role-name>OutsideJMSUser</role-name>
          > > </security-role>
          > > </assembly-descriptor>
          > >
          > > </ejb-jar>
          > >
          > > <weblogic-ejb-jar>
          > > <weblogic-enterprise-bean>
          > > <ejb-name>MDB</ejb-name>
          > > <message-driven-descriptor>
          > > <pool>
          > > <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
          > > </pool>
          > > <destination-jndi-name>ForeignTopic</destination-jndi-name>
          > >
          > >
          >
          <connection-factory-jndi-name>ForeignConnectionFactory</connection-factory-j
          > > ndi-name>
          > > </message-driven-descriptor>
          > > <jndi-name>MDB</jndi-name>
          > > </weblogic-enterprise-bean>
          > >
          > > <security-role-assignment>
          > > <role-name>OutsideJMSUser</role-name>
          > > <principal-name>OutsideJMSUser</principal-name>
          > > </security-role-assignment>
          > >
          > > </weblogic-ejb-jar>
          > >
          > >
          >
          >
          

Similar Messages

  • ORA-25228 error occurs when Foreign JMS Server connecting to the Oracle AQ

    Hi,
    I configure of a Foreign JMS Server that uses the Oracle JDBC Driver to connect to the AQ Topic. I use OSB messaging proxy service as a JMS client to connect the Foreign JMS Server. After the launch, I get the following error:
    ####<Jan 30, 2013 4:51:49 AM MSK> <Error> <EJB> <EPRUSARW0520> <osb_server1> <RequestEJB7826682746890400115XX35047bed.13c85602eea.X7f53> <<anonymous>> <> <0000Jm8w2Es6qI_5xRh8iW1H1sMk0001sD> <1359507109078> <BEA-010079> <An error occurred while attempting to receive a message from JMS for processing by a message-driven bean: oracle.jms.AQjmsException: JMS-120: Dequeue failed
    Nested exception: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 11
    ORA-25228: timeout or end-of-fetch during message dequeue from MDM.ALL_NSI
    The exception is : oracle.jms.AQjmsException: JMS-120: Dequeue failed
         at oracle.jms.AQjmsError.throwEx(AQjmsError.java:315)
         at oracle.jms.AQjmsConsumer.jdbcDequeue(AQjmsConsumer.java:1620)
         at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:1035)
         at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:960)
         at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:938)
         at oracle.jms.AQjmsConsumer.receive(AQjmsConsumer.java:790)
         at weblogic.deployment.jms.WrappedMessageConsumer.receive(WrappedMessageConsumer.java:201)
         at weblogic.ejb.container.internal.JMSMessagePoller$1.run(JMSMessagePoller.java:262)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.ejb.container.internal.JMSConnectionPoller.doPrivilegedJMSAction(JMSConnectionPoller.java:2752)
         at weblogic.ejb.container.internal.JMSMessagePoller.processOneMessage(JMSMessagePoller.java:257)
         at weblogic.ejb.container.internal.JMSMessagePoller.pollContinuously(JMSMessagePoller.java:351)
         at weblogic.ejb.container.internal.JMSMessagePoller.pollForParent(JMSMessagePoller.java:483)
         at weblogic.ejb.container.internal.JMSMessagePoller.run(JMSMessagePoller.java:499)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 11
    ORA-25228: timeout or end-of-fetch during message dequeue from MDM.ALL_NSI
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:397)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
         at oracle.jdbc.driver.T4Caqdq.processError(T4Caqdq.java:497)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
         at oracle.jdbc.driver.T4Caqdq.doOAQDQ(T4Caqdq.java:183)
         at oracle.jdbc.driver.T4CConnection.doDequeue(T4CConnection.java:4704)
         at oracle.jdbc.driver.PhysicalConnection.dequeue(PhysicalConnection.java:17863)
         at oracle.jdbc.driver.PhysicalConnection.dequeue(PhysicalConnection.java:17949)
         at oracle.jdbc.OracleConnectionWrapper.dequeue(OracleConnectionWrapper.java:1624)
         at weblogic.jdbc.wrapper.XAConnection_oracle_jdbc_driver_LogicalConnection.dequeue(Unknown Source)
         at weblogic.jdbc.wrapper.JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection.dequeue(Unknown Source)
         at oracle.jms.AQjmsConsumer.jdbcConnectionDequeueCheck25242(AQjmsConsumer.java:1713)
         at oracle.jms.AQjmsConsumer.jdbcDequeue(AQjmsConsumer.java:1295)
         ... 13 moreHowever, when I put message to AQ topic, the OSB proxy receives and processes it. But SQLException occurs every five seconds and pollute logs.
    Request help to resolve this.
    Thanks in advance.
    Regards
    Alexander.

    Maybe this can help: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::p11_question_id:4018285967344

  • Load balancing MQ 7.0 Foreign JMS Server and Weblogic 10 MDBs?

    We have the following configuration and we are trying to troubleshoot what appears to be a load balancing issue.
    We have 3 Solaris servers. Each Solaris server has two Weblogic managed servers running on it. There are a total of 6 managed servers in the Weblogic cluster.
    MQ Series 7.0 is also installed on each Solaris server. The MQ queue managers are in a MQ cluster. Each queue manager has the same queues defined.
    We have a foreign JMS Server configured on Weblogic that has destinations and a connection factory defined. There aren't many configuration options available for the connection factory. The destinations are bound to the queues defined on MQ using the MQ bindings file.
    The MQ bindings file was generated using the TRANSPORT(BIND) mechanism. Each bindings file points to the queue manager running on that machine. So the 2 managed servers running on one machine are accepting messages from the queue manager on that machine.
    The MDB's listenning for messages on the MQ queues are configured as follows in the weblogic-ejb-jar.xml:
         <max-beans-in-free-pool>16</max-beans-in-free-pool>
    We also created a custom work manager with min threads constraint=5 and max threads constraint=16. The dispatch-policy of all the MDBs is set to the custom work manager.
    The open input count on each MQ queue managers shows up as 32 which is expected.
    The default load algorithm on the cluster is round-robin.
    When we run a load test (injecting 40 messages per second on one MQ queue), we notice that one managed server ends up being significantly loaded than the other. Each MQ queue manager in the MQ cluster receives approximately the same number of messages in the load test. But it seems like one managed server is preferred over the other in Weblogic.
    What can be done to equally balance the load among the two managed servers on each Solaris server?
    Thanks for the help.

    Load balancing generally applies at determing how many consumer threads has to be created on each of the clustered queue instance. In that sense you have achieved perfect load balancing as your queue instances has the same no of consumer threads.
    Once you have set 'x' consumer threads on a queue, it is upto messaging provider to decide which thread to deliver a particular message and you will hardly have any control over this. Since your 32 threads are listening on the same queue, MQ can select any thread for delivering the message and the behaviour could be non deterministic.
    One option to change your design is to have a dispacther mdb which picks the messages off the MQ and then routes to a weblogic distributed destination and you can have your core mdb which does all processing listen to this distributed destination. You can enable load balancing when the disaptcher mdb routes the message to the distributed destination. Since dispatcher MDB is nothing more than a router, the unbalanced consumption off the MQ shouldn't seriously affect the server.

  • 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>

  • Foreign JMS server connection issue.

    Hi All,
    We are migrating a JMS application from websphere 6.1 to weblogic 10.3. The message queue resides in a TIBCO EMS server.
    We are trying to configure the foreign JMS server through JMS Module in the admin console. We are getting the following error will deploying the application.
    +<May 4, 2009 12:32:52 AM PDT> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: TxnMessageSubscriber is unable to connect to the JMS destination: weblogic.bbmdb-txn.jms/system+
    module-0-jms.xml. The Error was:
    Can not get distribute destination information. The destination JNDI name is weblogic.bbmdb-txn.jms/systemmodule-0-jms.xml, the provider URL is null>
    we have provided the connection URL in "JNDI Connection URL" column in the foreign server setup page.
    Is there any other thing that need to be configured?

    I m facing the same problem, we are using Weblogic Server 10.3.
    We have defined a cluster on one Weblogic server and have created one managed server in the cluster machine and the other managed server in another machine.
    We are using Foreign JMS and I m getting the error as follow:
    ####<Jun 19, 2009 3:30:53 PM IST> <Warning> <EJB> <iflexpkw513> <Managed1> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1245405653881> <BEA-010061> <The Message-Driven EJB: TestJMSALSB is unable to connect to the JMS destination: fcssi/FCSSI. The Error was:
    Can not get distribute destination information. The destination JNDI name is fcssi/FCSSI, the provider URL is null>
    Not able to understand what is the problem here...
    ejb-jar.xml :
    <?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 id="ejb-jar_ID">
    <enterprise-beans>
    <message-driven>
    <ejb-name>TestJMSALSB</ejb-name>
    <ejb-class>samplemdb.TestJMSALSB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination id="MessageDrivenDestination_1169302343246">
         <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    weblogic-ejb-jar.xml :
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-ejb-jar
    xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
    <weblogic-enterprise-bean>
    <ejb-name>TestJMSALSB</ejb-name>
    <message-driven-descriptor>
    <destination-jndi-name>fcssi/FCSSI</destination-jndi-name>
    <connection-factory-jndi-name>iflex/fcssiQCF</connection-factory-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    Can anyone provide some help on this.....

  • Foreign JMS Server Limitation

    Hi all,
              Iam facing a limitation with Foreign JMS server.
              We are tyring to migrate from Message Bridge to Foreign JMS server.
              Our current setup is
              We have 3 MQ queues which are bridged to one JMS destination(queue).The MDB is consuming messages from the weblogic queue.
              If we want to replace this setup with Foreign JMS server the MDB can connect to only one MQ queue.
              We want the MDB to consume messages from all the 3 queues.
              How can we acheive this ?
              Thanks,
              Rabbani

    U should take my reply with a grain of salt because I'm pretty new at this stuff but I don't think it's within an MDBs design to listen to more than one queue/topic so therefore you'll have to create additional MDBs that either listen to each foreign queue individually and do whatever your single MDB is doing with the data now or create the n MDBS (where n = number of foreign queues currently bridgin to the one) that then publish to an intermediate topic which your existing MDB can listen to.
              Hope this helps, figure if I'm going to be pounding the boards with questions I should try to contribute where I can ;)
              And also, if you do setup the foreign JMS provider feel free to take a look at my topic and provide your experience if you think it will help :D

  • Foreign JMS Server - Weblogic 8.1 - Weblogic 8.1

    Hi
    I have to weblogic servers running on different ports.
    http://server1:port1
    http://server2:port2
    I have configured JMS store, JMS server, Destination (queue) in port2. I am able to send messages and retrieve messages in port2.
    I have written a MDB which was deployed in server1. I want to process the Messages posted to server2 destination. I tried to configure foreign JMS server in server1.
    In both servers, i am using default connection factories only.
    I am getting the following exceptions.
    ForeignMDB is unable to connect to the JMS destination: LocalTestingQueue
    LocalTestingQueue is the local jndi name given to the foreign destination.
    please find below the weblogic.xml entries for MDB
    <weblogic-enterprise-bean>
         <ejb-name>ForeignMDB</ejb-name>
         <message-driven-descriptor>           <destination-jndi-name>LocalTestingQueue</destination-jndi-name>           <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
              <provider-url>http://myserver:26565</provider-url>          <connection-factory-jndi-name>weblogic.jms.ConnectionFactory</connection-factory-jndi-name>
         </message-driven-descriptor>
    </weblogic-enterprise-bean>
    could you please guide me to complete this?
    Thanks in advance
    Srinivas

    1 - Ensure that the MDB is configured to reference the remote connection factory AND remote destination.
    2 - If using the foreign JMS server facility, ensure that it defines the URL of the remote cluster/server, a connection factory mapping, and a destination mapping. Also ensure that the MDB connection factory and destination descriptor fields reference the local JNDI names for the mappings.
    3 - If not using the foreign JMS server facility, ensure that the MDB descriptor has the URL of the remote cluster, and a destination JNDI name that's in the remote cluster. (The connection factory JNDI name is not needed in this case, as the MDB will automatically look for a default connection factory that MDB's use.)
    I think the MDB chapter of the EJB programmer's guide will likely be helpful here. The latest documentation for the latest release may be more up-to-date than 8.1 -- the concepts are the same with the newer releases.
    Tom

  • MDB problem with Foreign JMS MQ

    Hi,
    I have MDB 2.1 and i am trying to deploy in weblogic 10.2 app server. Below is my ejb-jar.xml and weblogic.jar xml config. I have a foreign JMS configured and i have destination and connection factory configured too. I was able to post a message to the queue successfully, but my MDB is not getting executed I am getting below exception during the startup of application. I can see other EJBs in the JNDI but not my MDBs. Please advice and your help is very much appreciated.
    Warning Message:
    <Jun 1, 2010 10:24:04 AM CDT> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: IFIPNCDistributorMDB is unable to connect to the JMS destination: jms/MyQueue. The Error was:
    Can not get distribute destination information. The destination JNDI name is jms/MyQueue, the provider URL is file:/C:/JNDI-Directory>
    weblogic-ejb-jar.xml
    <weblogic-enterprise-bean>
    <ejb-name>MDB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>4</max-beans-in-free-pool>
    <initial-beans-in-free-pool>4</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>jms/IFIPNCQueue</destination-jndi-name>
    <initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
    <provider-url>file:/C:/JNDI-Directory</provider-url>
    <connection-factory-jndi-name>jms/MyQCF</connection-factory-jndi-name>
    </message-driven-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>MyQCF</res-ref-name>
    <jndi-name>jms/MyQCF</jndi-name>
    </resource-description>
    <resource-description>
    <res-ref-name>MyQueue</res-ref-name>
    <jndi-name>jms/MyQueue</jndi-name>
    </resource-description>
    </reference-descriptor>
    <jndi-name>MDB</jndi-name>
    </weblogic-enterprise-bean>
    ejb-jar.xml
    <message-driven id="MDB">
                   <ejb-name>MDB</ejb-name>
                   <ejb-class>com.IFIPNCDistributorMDB</ejb-class>               
                   <transaction-type>Bean</transaction-type>               
                   <message-driven-destination>
                        <destination-type>javax.jms.Queue</destination-type>
                   </message-driven-destination>
                   <resource-ref>
              <res-ref-name>jms/QCF</res-ref-name>
              <res-type>javax.jms.QueueConnectionFactory</res-type>
              <res-auth>Application</res-auth>
              <res-sharing-scope>Unshareable</res-sharing-scope>
         </resource-ref>
         <resource-ref>
              <res-ref-name>jms/MyQueue</res-ref-name>
              <res-type>javax.jms.Queue</res-type>
              <res-auth>Application</res-auth>
              <res-sharing-scope>Unshareable</res-sharing-scope>
              </resource-ref>
              </message-driven>
    Thank You,
    VJ

    Can you setup as in this example:
    Foreign JMS_
    <foreign-server name=”ForeignServer”>
    <default-targeting-enabled>true</default-targeting-enabled>
    <foreign-destination name=”A”>
    <local-jndi-name>A</local-jndi-name>
    <remote-jndi-name>queue/A</remote-jndi-name>
    </foreign-destination>
    <foreign-connection-factory name=”FConf”>
    <local-jndi-name>FConf</local-jndi-name>
    <remote-jndi-name>ConnectionFactory</remote-jndi-name>
    <username>esbuser</username>
    <password-encrypted>{3DES}90sIZwo6Llr9r73p+VXkvQ==</password-encrypted>
    </foreign-connection-factory>
    <initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
    <connection-url>file:/C:/JNDI-Directory</connection-url>
    </foreign-server>
    weblogic-ejb-jar.xml_
    <?xml version=’1.0′ encoding=’UTF-8′?>
    <web:weblogic-ejb-jar xmlns:web=”http://www.bea.com/ns/weblogic/weblogic-ejb-jar”>
    <web:weblogic-enterprise-bean>
    <web:ejb-name>RequestEJB-2518965873970113789–2352f820.127bd3f293c.-7fdb</web:ejb-name>
    <web:message-driven-descriptor>
    <web:pool>
    <web:max-beans-in-free-pool>1000</web:max-beans-in-free-pool>
    <web:initial-beans-in-free-pool>1</web:initial-beans-in-free-pool>
    </web:pool>
    <web:destination-jndi-name>A</web:destination-jndi-name>
    <web:connection-factory-jndi-name>FConf</web:connection-factory-jndi-name>
    </web:message-driven-descriptor>
    <web:transaction-descriptor>
    <web:trans-timeout-seconds>600</web:trans-timeout-seconds>
    </web:transaction-descriptor>
    <web:resource-description>
    <web:res-ref-name>jms/ConnectionFactory</web:res-ref-name>
    <web:jndi-name>FConf</web:jndi-name>
    </web:resource-description>
    <web:resource-description>
    <web:res-ref-name>jms/QueueName</web:res-ref-name>
    <web:jndi-name>A</web:jndi-name>
    </web:resource-description>
    </web:weblogic-enterprise-bean>
    </web:weblogic-ejb-jar>
    Note, local JNDI names in the foreign jms server should be used for destination-jndi and conection-factory-jndi. No need to specify provider URL in deployment descriptors. Instead it is specified at the foreign jms setup.
    Also you should use the same resource-reference names in both ejb-jar & weblogic-ejb-jar.xml's., In above example resource-reference section of ejb-jar should look like:
    <resource-ref>
    <res-ref-name>jms/ConnectionFactory</res-ref-name>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    <resource-ref>
    <res-ref-name>jms/QueueName</res-ref-name>
    <res-type>javax.jms.Queue</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>

  • Error occurred when use foreign Jms server[JMSClientExceptions:055142].

    I want to use a foreign Jms server(Tibco EMS), after I have config the JNDI of foreign server,connectionfactory and destinations, the correct JNDI name can be find on the JNDI tree.
    Then I deploy a demo mdb ear on the weblogic(version is 10.3),there's warnning tag on the ear application, and there is error message in the log:
    <2011-1-10 上午10时15分07秒 CST> <Warning> <EJB> <BEA-010061> <The Message-Drive
    n EJB: MDBDemo is unable to connect to the JMS destination: NotifyAlertAlertQueue. The Error was:
    weblogic.jms.common.InvalidDestinationException: [JMSClientExceptions:055142]Foreign destination, Queue[notify.alert.alertQueue]>
    NotifyAlertAlertQueue is the JNDI name of the destination defined on the weblogic console,and the same as ems jndi name for queue notify.alert.alertQueue.
    It seems that the application has find the queue correctly, but why it throw that exception[JMSClientExceptions:055142]?
    Thanks for any help.
    Edited by: 826761 on 2011-1-9 下午6:40

    I suspect that somehow your configuration is messed up and the MDB ended up using a WebLogic connection to access a TIBCO EMS destination.
    Please make sure that your JMS server configuration maps a TIBCO connection factory jndi name to a jndi name in WebLogic server JNDI tree, a TIBCO destination jndi name to a jndi name in WebLogic server JNDI tree, and your MDB configuration refers to the jndi names in the WebLogic JNDI tree.
    Regards.

  • Do I need a Foreign JMS Server?

              Initially, I had an exploded web application, an ejb jar, a jms server, a connection
              factory and a queue all deployed under one weblogic instance. I am now trying
              to move the jms configuration to another machine running weblogic. However, I
              am unsure whether I need to configure a Foreign JMS Server on the initial weblogic
              instance. I have tried to do so and I cannot successfully start the connection
              from my web/ejb app (i.e., myQueueConnection.start() throws an exception - weblogic.jms.common.JMSException:
              Connection not found).
              I saw a thread here about changing the names of the JMS Servers, so I configured
              my web server with a foreign jms server (ForeignMessageServer) and I configured
              one foreign connection factory and one foreign destination. The local jndi names
              of these are unique and different from the remote jndi name. The remote jndi names
              match the names of the connection/destination on the app server (my 2nd server).
              I am using the url of the web server as my provider url and the foreign connection
              factory local jndi name to look up the connection.
              I have two questions:
              Is it necessary to use a foreign jms server configuration to implement this structure?
              If a foreign jms server configuration is necessary, am I going about this correctly?
              Thanks,
              John
              

    It certainly will work. Basically, all it does is move information like the
              JNDI provider name and URL from your deployment descriptors into config.xml.
              For a lot of applications, that's a big help. You can use the "Foreign JMS
              Provider" support anywhere you want to create a JNDI entry on your local
              server that points to something else. You can even use it to point to a JMS
              queue, topic, or connection factory in the same cluster, or the same WLS
              server if you want. I do this for testing so I don't have to have different
              versions of my EJB for different environments.
              As for the bridge, it depends on whether you need to interact with the JMS
              provider synchronously or asynchronously. When you use the bridge, you first
              put the message on one JMS queue or topic, and the bridge copies it to the
              other. So, if the foreign provider is down, you can still send messages.
              However, using the bridge adds an extra "hop" which will slow performance.
              greg
              <[email protected]> wrote in message news:[email protected]...
              > Hi Tom,
              >
              > If I have 2 WLS servers: server1 and server2 and they are NOT in the same
              > cluster. server1 wants to send a JMS message to server2. I know I can
              > achieve the desired result using your 3 suggestions below but would
              using
              > foreign JMS server works as well? When should I use foreign JMS server
              > instead of a messaging bridge?
              >
              > Thanks,
              >
              > Vincent
              >
              >
              >
              > "Tom Barnes" <[email protected]> wrote in message
              > news:[email protected]...
              > > If both weblogic servers participate in the same cluster
              > > there is no additional configuration needed.
              > > All servers in cluster share the same JNDI
              > > name space. Simply specifying a JNDI name
              > > (as you already must have done) is enough
              > > for any server in the cluster, or any client connected
              > > to the cluster, to find a JNDI resource that is hosted
              > > on any server in the cluster (such as queue).
              > > This location transparency is one of the primary
              > > benefits of using clusters.
              > >
              > > If the MDB is in a different cluster than its
              > > source destination, then you have three choices
              > > (1) Change the MDB weblogic descriptor to specify
              > > a URL that resolves to any one of the
              > > addresses of a WL server in the remote cluster.
              > > I don't recall the name of the URL field,
              > > but it is in the weblogic descriptor, and
              > > is documented in the EJB (MDB) programmer's
              > > guide.
              > > (2) Configure wrappers that refer to the
              > > remote JMS resources in the cluster, and change
              > > the MDB descriptors to point to the jndi
              > > locations you configured for the wrapped
              > > connection factory and wrapped destination.
              > > (3) Configure a messaging bridge that
              > > moves from the remote destination to
              > > a local destination (which, in turn,
              > > the MDB consumes from).
              > >
              > > Tom
              > >
              > > John Owen wrote:
              > >
              > > > Initially, I had an exploded web application, an ejb jar, a jms
              server,
              > a connection
              > > > factory and a queue all deployed under one weblogic instance. I am now
              > trying
              > > > to move the jms configuration to another machine running weblogic.
              > However, I
              > > > am unsure whether I need to configure a Foreign JMS Server on the
              > initial weblogic
              > > > instance. I have tried to do so and I cannot successfully start the
              > connection
              > > > from my web/ejb app (i.e., myQueueConnection.start() throws an
              > exception - weblogic.jms.common.JMSException:
              > > > Connection not found).
              > > >
              > > > I saw a thread here about changing the names of the JMS Servers, so I
              > configured
              > > > my web server with a foreign jms server (ForeignMessageServer) and I
              > configured
              > > > one foreign connection factory and one foreign destination. The local
              > jndi names
              > > > of these are unique and different from the remote jndi name. The
              remote
              > jndi names
              > > > match the names of the connection/destination on the app server (my
              2nd
              > server).
              > > > I am using the url of the web server as my provider url and the
              foreign
              > connection
              > > > factory local jndi name to look up the connection.
              > > >
              > > > I have two questions:
              > > >
              > > > Is it necessary to use a foreign jms server configuration to implement
              > this structure?
              > > > If a foreign jms server configuration is necessary, am I going about
              > this correctly?
              > > >
              > > > Thanks,
              > > > John
              > >
              >
              >
              

  • Losing connection to TIBCO JMS Server

    I'm having a very strange problem with a Message Driven Bean in WebLogic. We're using a TIBCO JMS Server so I setup a Foreign JMS Server in Weblogic for my MDB. Seems to work fine and receive messages for awhile but then every morning at about the same time, I lose the connection. There are a number of other people connected to that TIBCO server for days/weeks with no problem, just me!
              I thought maybe the problem was with WebLogic so I wrote a main() method for my MDB which manually connects to the server/queue and calls setMessageListener(this). Same behavior: works overnight just fine and then disconnects at about 9:00am. No exception from JMS or anything, it just disconnects. I even set a JMS ExceptionListener but it never gets called.
              Has anyone had this bizarre problem?
              Thanks,
              - Ian

    Did you tried running that main program on the same machine where Tibco is running ?

  • MDB behavior with Foreign JMS Provider

              I am experiencing some MDB behavior which I do not quite understand. I would appreciate
              if someone could tell me what might be happening.
              An application on WebLogic 8.1 SP1 (also tried it with SP2) has MDB's which listen
              on a MQ Queue. If I put a large XML message on the MQ Queue (say around 600 KB),
              the onMessage execution is very random, For the large messages only 1 MDB gets
              invoked and the other messages just sit on the MQ Queue. Even though I have defined
              an weblogic execute queue for the MDB's and they have 15 threads allocated.
              The other messages get picked up after the first one gets completed. The problem
              is the whole transaction (which is XA) can take a while (upto 10 minutes). This
              is not intended, but for some reason it takes that long.
              Also, while monitoring the MDB execute queues, I noticed that none of the threads
              from that queue are performing the work and a thread dump shows that the weblogic.ejb20.internal.JMSPoller
              thread has invoked the MDB and is currently waiting for the database to finish
              some processing.
              When the message size is smaller, the MDB's fire concurrently and are executed
              on the MDB execute queue.
              Thanks,
              Ketan.
              

    When we're using MDBs against a foreign JMS provider with XA, the EJB
              container tries to reduce the number of threads that are blocked waiting for
              a message. You should see lots of threads working when there are lots of
              messages on the queue, a few threads (or only one) working when the queue is
              empty or nearly so, and there should be some ramp-up and ramp-down time in
              between. It sounds like the ramp-up takes longer in your case because
              receiving the very first message takes a long time.
              If this behavior is causing big problems for you, you might want to contact
              product support and file an enhancement request.
              greg
              "Ketan" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Here is some more information regarding this issue.
              >
              > When I place sufficiently large messages (such that the parsing and
              processing
              > of these messages takes longer than it does for normal size messages), I
              notice
              > the following behavior.
              >
              > Lets say I put 6 large messages on the MQ Queue. The server immediately
              picks
              > up 1 message and starts processing it. The other 5 messages are sitting on
              the
              > MQ Queue, while the MDB execute queue has all 15 idle threads.
              >
              > After the processing of the message is done, 2 messages get picked up.
              This time,
              > 1 thread in the MDB execute queue gets the message and the other is
              processed
              > by the JMSPoller thread. After these 2 messages are processed, 3 Messages
              get
              > picked up and this time 2 messages are on the MDB execute queue and 1 is
              processed
              > by the JMSPoller.
              >
              > So based on this the question is ..Is this the expected behavior? I was
              under
              > the impression that the poller would simply dispatch messages to the
              execute queue,
              > and as a result, I was expecting all the messages would get picked up from
              the
              > MQ queue pretty fast and would not have to wait for 1 or more MDB's to
              finish
              > processing.
              >
              > I would really appreciate any suggestions anyone may have for me.
              >
              > Again the environment is WLS 8.1 SP2, MQ 5.3
              >
              > thanks,
              > Ketan
              

  • Foreign JMS Server Persistance\Retry in case Remote JMS Provider goes down

    Hi All
    I would need more clarity on this. How does the Foreign JMS Server behave in case the remote JMS provider goes down. Does it take the message from the Publishing Proxy Service and retries\persists the JMS Message till the remote provide is up?
    Please let us know. This would effect our design as retrial is very important here. Thanks

    If you want to provide guaranteed delivery with automatic retries when using remote JMS implementations, there are multiple ways to implement it:
    1. While reading from a foreign JMS destination
    Create a Foreign JMS server using transactional drivers (use XA in case of JMS). The messages remain on remote server JMS queue and OSB proxy polls the message directly on remote server. So if Remote Server is down OSB will not be able to read the message. Once remote server is up OSB will pick up the message (as long as foreign JMS server provides persistence and maintains the messages in the queue during a server restart). In case of error in OSB foreign queue can do retry if it provides a retry mechanism.
    2. While writing the message to a foreign JMS destination
    a. Use a foreign JMS server using transactional connection. Put the retry mechanism in OSB Business service which writes to the foreign JMS/MQ queue. In case of failure Business Service can retry based on configuration. If you want to provide guaranteed delivery then create a local JMS queue to store the messages. So when remote destination is down for a long time undelivered messages will be rolled back to the local queue. You can put retry mechanism on the local queue.
    b. Use a messaging bridge which will write the messages to the remote destination. You can configure retry delivery rules in messaging bridge so once busienss service writes the message to the bridge, a SAF agent will ensure the delivery to remote destination whenever it is up.

  • Foreign JMS Server vs Messaging bridge

    Could any body tell me which one is the best Whether Foreign JMS Server or Messaging bridge for connecting Weblogic to IBM MQ Series.I am trying to use foreign jms server but i dont know how to post the message to that queue i created in foreign jms server..

    Hi,
              For sending messages non-transactionally, foreign JMS server is sufficient. For sending messages transactionally using standard JTA transactions, the simplest way is to send them on the server and reference the foreign JMS through an EJB resource reference. See the the following FAQ for a walk-through of the various options, including guidance on when to use a bridge:
              http://e-docs.bea.com/wls/docs81/faq/interop.html
              Tom

  • WLS 11g, define foreign JMS server

    Hi,
    I want to define JMS server on my server A and set on this A JMS server foreign destination to the JMS server B.
    On server A i defined:
    - JMS server and set target
    - JMS modules (set subdeployment, Connection Factory, Uniform Distributed Queue, JNDI Name, subdeployment)
    And i dont know where can i set destination foreign JMS server ? I have to define:
    - at JMS server: JNDI Connection URL: t3://XXX.0.22.191:7004,
    - at factory: Remote JNDI Name: Jms.VI and user name
    - at destination: Remote JNDI Name: Jms.queue.NOTIFICATIONS
    can you help me?
    thanks

    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e13952/taskhelp/jms_modules/foreign_servers/ConfigureForeignServers.html

Maybe you are looking for

  • How can you tell if an iPod touch has the new apps?

    Having seen the updates to the ipod Touch I'm finally ready to buy one. From the keynote I gather that new units shipping from the factory after 15 Jan have the new software, old units do not and, unusually for apple, even if you buy an old software

  • RCU Install error - Timeout while connecting to the datbase

    Hi All, I am trying to install the OBIEE 11.1.1.7 in my Laptop - OS is Windows 7.I am at the level of RCU Creation. While I am running the rcu.bat, I entered all the database connectivity details such as host name, service name, port number etc.But w

  • Conditional build tags with numbered lists

    Hi, I am using conditional build tags to create a separate version of our product help file for a cut down version of the software. In our help instructions we use numbered tasks for explaining how to complete a process. Where some steps aren't requi

  • CLOB Column

    Hi all Can anyone help me in doing the following I have the following query It returns a xml string. I need to put into a CLOB variable and insert into a clob column. SQL> select xmlforest(empno, ename, sal) as "result" from scott.emp result <EMPNO>7

  • Pricing IC WEB / GUI

    Hello hi, When we try to modify a condition type in GUI for a sales order system is allowing you to change. BUT when we try to change the sales order's price from WEB, As soon as we sellect the condition type (from ADD ot Edit List), system is automa