Foreign JMS provider

Hi,
I have a pool of MDB's running on wls 9.x (subscriber). MDB pools subscribe to JMS Topics runnng on wls 10 MP1 (publisher).
Do I need to import publisher as a foreign jms provider into the subscriber domain ?
Why not use simple t3 config from the subscriber side (specify publisher's t3 url etc.)?
What are the pros and cons of either approach ?
Thanx,

Hi,
WebLogic MDBs provide the option of either specifying the URL for the source destination directly inside the MDB descriptor, or specifying the URL via a foreign JMS provider.
I think the trade-offs are discussed in the MDB programmer's guide, but I think that the main benefit of using a foreign JMS is that it provides the opportunity to administratively change the URL without changing the descriptor. You can also use the foreign JMS config to change the mapping for destination.
By the way, if you use Foreign JMS, don't forget to specify a connection factory JNDI name in the MDB descriptor that references a connection factory mapping that's advertised locally by the Foreign JMS feature.
Tom

Similar Messages

  • 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
              

  • Configuring WL JMS as a foreign JMS provider with security scope (WLS 8.1)

    Hello, i have a problem accessing a queue from a foreign jms provider, if the queue has a security policy. I have the following scenario:
              1) Server server1 in domain1 (WLS81) has a JMS Server with one queue queue1 with a security policy "Caller is a member of the group GROUP_QUEUE". There is also a user USER_QUEUE user defined, which belongs to the this group.
              There is also a ConnectionFactory with "XA Connection Factory Enabled = true" configured.
              The queue and the connection factory are visible in the jndi tree of this server.
              2) Server server2 has a foreign jms server. Foreign JMSConnectionFactory and foreign JMSDestination refer to the jndi entries of server 1. For Foreign JMS Connection Factory username is set to USER_QUEUE. JNDI entries for foreign references are visible in jndi tree of this server.
              I wrote a standalone client to store messages in the queue accessing server1 with USER_QUEUE sucessfully.
              Now I try to deploy a MDB on server2 accessing the queue on server 1. I tried different versions of ejb-jar.xml/weblogic-ejb-jar.xml to access the queue, but with no luck.
              scenario a): no security entries in both descriptors; weblogic-descr has entries <destination-jndi-name> and <connection-factory-jndi-name> pointing to the local jndi names. REsult:
              <11.02.2005 19.16 Uhr CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
              CancelEasyMoneyBean is unable to connect to the JMS destination: prepaid.Cancel
              EasyMoneyQueue. The Error was:
              [EJB:010196]'weblogic.jms.common.JMSSecurityException: Access denied to resource
              : type=<jms>, application=, destinationType=queue, resource=CancelEasyMoneyQueue
              , action=receive' Linked exception = 'weblogic.jms.common.JMSSecurityException:
              Access denied to resource: type=<jms>, application=, destinationType=queue, reso
              urce=CancelEasyMoneyQueue, action=receive'
              So entering username and password for ForeignJMSConnectionFactory doesn't do the trick.
              scenario b:) trying to set additional security entries in both descriptors. I added a role queueUser to my mdb and to weblogic-descr a
              <security-role-assignment>
              <role-name>queueUser</role-name>
              <principal-name>USER_QUEUE<principal-name>
              </security-role-assignment>
              I added the user USER_QUEUE and the group GROUP_QUEUE to server2.
              Now server 1 throws exception after redeployment on server 2:
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE].
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE]
              at weblogic.security.service.SecurityServiceManager.seal(SecurityService
              Manager.java:680)
              Has anybody an idea or a pointer how to define access from a mdb to a foreign queue using security ?
              Thanks in advance,
              Rainer

    Hello, i have a problem accessing a queue from a foreign jms provider, if the queue has a security policy. I have the following scenario:
              1) Server server1 in domain1 (WLS81) has a JMS Server with one queue queue1 with a security policy "Caller is a member of the group GROUP_QUEUE". There is also a user USER_QUEUE user defined, which belongs to the this group.
              There is also a ConnectionFactory with "XA Connection Factory Enabled = true" configured.
              The queue and the connection factory are visible in the jndi tree of this server.
              2) Server server2 has a foreign jms server. Foreign JMSConnectionFactory and foreign JMSDestination refer to the jndi entries of server 1. For Foreign JMS Connection Factory username is set to USER_QUEUE. JNDI entries for foreign references are visible in jndi tree of this server.
              I wrote a standalone client to store messages in the queue accessing server1 with USER_QUEUE sucessfully.
              Now I try to deploy a MDB on server2 accessing the queue on server 1. I tried different versions of ejb-jar.xml/weblogic-ejb-jar.xml to access the queue, but with no luck.
              scenario a): no security entries in both descriptors; weblogic-descr has entries <destination-jndi-name> and <connection-factory-jndi-name> pointing to the local jndi names. REsult:
              <11.02.2005 19.16 Uhr CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
              CancelEasyMoneyBean is unable to connect to the JMS destination: prepaid.Cancel
              EasyMoneyQueue. The Error was:
              [EJB:010196]'weblogic.jms.common.JMSSecurityException: Access denied to resource
              : type=<jms>, application=, destinationType=queue, resource=CancelEasyMoneyQueue
              , action=receive' Linked exception = 'weblogic.jms.common.JMSSecurityException:
              Access denied to resource: type=<jms>, application=, destinationType=queue, reso
              urce=CancelEasyMoneyQueue, action=receive'
              So entering username and password for ForeignJMSConnectionFactory doesn't do the trick.
              scenario b:) trying to set additional security entries in both descriptors. I added a role queueUser to my mdb and to weblogic-descr a
              <security-role-assignment>
              <role-name>queueUser</role-name>
              <principal-name>USER_QUEUE<principal-name>
              </security-role-assignment>
              I added the user USER_QUEUE and the group GROUP_QUEUE to server2.
              Now server 1 throws exception after redeployment on server 2:
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE].
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE]
              at weblogic.security.service.SecurityServiceManager.seal(SecurityService
              Manager.java:680)
              Has anybody an idea or a pointer how to define access from a mdb to a foreign queue using security ?
              Thanks in advance,
              Rainer

  • One phase commit optimization with AQ as Foreign JMS Provider?

    Hello,
    we currently use Weblogic JMS and Oracle DB in our server. This requires XA and the two phase commit.
    We are considering to switch from Weblogic JMS to Oracle AQ. The main reason is to move persistence from files to the DB (which is RAC). We could use JDBC persistence, but we think AQ will be more efficient and flexible.
    We also hope that using AQ will allow WLS to make use of the one phase commit optimization in XA (when only one resource manager is involved). But I am wondering if the extra abstraction of the Foreign JMS Provider prevents that optimization.
    Anybody know? Have tried this?
    Thanks...
    Roger

    This might be of help to you. https://xa-compliant-oracleaq.projects.dev2dev.bea.com
              In this case, whenever the MDB polls on the bound QCF(This is a Referenceable Object), WebLogic calls the ObjectFactory class and recreates the QCF for the MDB. I think you can take a similar approach. Mind you will have to implement the Referenceable interface for this. This way, you won't have to re-run your startup class.
              cheers !
              Dips

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

  • Dead message queue - DLQ for foreign JMS providers

    Is there a way to configure Error-queue or 'Dead message/letter queue' in MDB listening to foreign JMS provider like JBoss? (Automatic routing of failed messages to error-queue after specified retries to preserve JMS messages)
              I did all the docs from BEA and it doesn't cover this DLQ for foreign JMS providers :). For Weblogic JMS service, DLQ can be configured in the config.xml. But for <ForeignJMSServer> there is no way to configure dead-queue.
              Could some please validate this before I start coding this piece in the application instead of appserver configuration.
              JMS provider is Tibco and JMS destinations are pre-defined and can't/doesn't need to be created
              Thanks in advance.

    Interesting idea! But no, there's no facility for redirecting failed foreign provider messages to a DLQ. This is a feature normally supplied by the foreign provider itself.
              Some foreign providers, in addition to WebLogic 9.0 JMS, provide a "redelivery count" property in the message. If the foreign provider provides no automatic DLQ capability, you might be able to leverage this property to have your MDB application code automatically forward messages with high redelivery counts to the DLQ.
              Tom

  • Foreign JMS not enlisting XA Transactions

    I'm working on implementing an XA interface layer to an implementation of a foreign JMS provider and am having a problem with enlisting XA transactions in WebLogic.
    I implemented a simple JNDI that stores and retrieves serialized versions of classes in the local filesystem.
    I create an XATopicConnectionFactory named ambxatcf and a Topic named ChatterTopic and store them in there.
    The XATopicConnection implements XAConnection.
    I put a client jar in bea/weblogic91/samples/domains/wl_server/lib/ which contains the JNDI code and all of my XA classes which call the JMS.
    That gets picked up by the server on startup.
    In the Web Logic Admin Console:
    I create a Foreign Server under JMS Modules, ambrosiaServer.
    I set the JNDI Initial Context Factory set to my JNDI InitialContext class and the JNDI Properties is the path to my JNDI filestore so that it can find the serialized objects.
    I create a Foreign Destination in this server which has a Local JNDI Name: Chatter and Remote JNDI Name: ChatterTopic
    And then also in this server, I create a Foreign Connection Factory, Local JNDI Name: ambxatcf and Remote JNDI Name: XATopicConnectionFactory.
    Then in Deployments, I Install the jar containing my bean and Start it.
    Then I run the client and the bean prints out the XATopicConnectionFactory and it's the one that came out my JNDI.
    I have messages in my XATopicConnectionFactory, XATopicConnection and XATopicSession code so I know they're getting called.
    What's not getting called is XATopicSession.getXAResource() or my XAResourceImpl.start() or XAResourceImpl.commit().
    This happens whether I have the bean set up for bean managed or container managed transactions.
    I'm testing against WebLogic 9.1.
    Thanks,
    Don Hermes

    Hi Tom,
              Thank you for your response.
              I saw the article in the 8.1 documentation but I also found the following in the 9.1 docs.
              So, I assumed it would work.
              Was that assumption wrong?
              Thanks,
              Don
              =====================
              http://e-docs.bea.com/wls/docs91/jms/j2ee.html
              Automatically Enlisting Transactions
              This feature works for either WebLogic JMS implementations or for third-party JMS providers that support two-phase commit transactions (XA protocol). If a wrapped JMS connection sends or receives a message inside a transaction context, the JMS session being used to send or receive the message is automatically enlisted in the transaction through the XA capabilities of the JMS provider. This is the case whether the transaction was started implicitly because the JMS code was invoked inside an EJB with container-managed transactions enabled, or whether the transaction was started manually using the UserTransaction interface in a servlet or an EJB that supports bean-managed transactions.

  • Foreign JMS and Enlisting Transactions?

    I'm working on implementing an XA interface layer to an implementation of a foreign JMS provider and am having a problem with enlisting XA transactions in WebLogic.
              I implemented a simple JNDI that stores and retrieves serialized versions of classes in the local filesystem.
              I create an XATopicConnectionFactory named ambxatcf and a Topic named ChatterTopic and store them in there.
              The XATopicConnection implements XAConnection.
              I put a client jar in bea/weblogic91/samples/domains/wl_server/lib/ which contains the JNDI code and all of my XA classes which call the JMS.
              That gets picked up by the server on startup.
              In the Web Logic Admin Console:
              I create a Foreign Server under JMS Modules, ambrosiaServer.
              I set the JNDI Initial Context Factory set to my JNDI InitialContext class and the JNDI Properties is the path to my JNDI filestore so that it can find the serialized objects.
              I create a Foreign Destination in this server which has a Local JNDI Name: Chatter and Remote JNDI Name: ChatterTopic
              And then also in this server, I create a Foreign Connection Factory, Local JNDI Name: ambxatcf and Remote JNDI Name: XATopicConnectionFactory.
              Then in Deployments, I Install the jar containing my bean and Start it.
              Then I run the client and the bean prints out the XATopicConnectionFactory and it's the one that came out my JNDI.
              I have messages in my XATopicConnectionFactory, XATopicConnection and XATopicSession code so I know they're getting called.
              What's not getting called is XATopicSession.getXAResource() or my XAResourceImpl.start() or XAResourceImpl.commit().
              This happens whether I have the bean set up for bean managed or container managed transactions.
              I'm testing against WebLogic 9.1.
              Thanks,
              Don Hermes

    Hi Tom,
              Thank you for your response.
              I saw the article in the 8.1 documentation but I also found the following in the 9.1 docs.
              So, I assumed it would work.
              Was that assumption wrong?
              Thanks,
              Don
              =====================
              http://e-docs.bea.com/wls/docs91/jms/j2ee.html
              Automatically Enlisting Transactions
              This feature works for either WebLogic JMS implementations or for third-party JMS providers that support two-phase commit transactions (XA protocol). If a wrapped JMS connection sends or receives a message inside a transaction context, the JMS session being used to send or receive the message is automatically enlisted in the transaction through the XA capabilities of the JMS provider. This is the case whether the transaction was started implicitly because the JMS code was invoked inside an EJB with container-managed transactions enabled, or whether the transaction was started manually using the UserTransaction interface in a servlet or an EJB that supports bean-managed transactions.

  • 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

  • ClassNotFoundException for initial-context-factory using foreign JMS p.

    Hi,
    I am currently working on migrating an application from weblogic 9 to weblogic 10 and I bumped into this issue while MDB connecting to JMS.
    [Loaded cz.jaksky.riskscenario.beans.RiskScenarioServiceLocalHome from file:/C:/SVN/app-WLS10-FRESH/app-deploy/servers/myserver/tmp/_WL_user/performance/nyubkw/point-interfaces.jar]
    <17-Sep-2012 11:01:27 o'clock CEST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PerformanceAsyncRequestBean is unable to connect to the JMS destination: wls.AsyncQueue. The Error was:
    javax.naming.NoInitialContextException: Cannot instantiate class: cz.jaksky.common.jms.JMSInitialContextFactory [Root exception is java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:182)
    at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
    at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
    at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at weblogic.jms.common.CDS$2.run(CDS.java:486)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)
    at weblogic.jms.common.CDS.lookupDestination(CDS.java:480)
    at weblogic.jms.common.CDS.lookupDDAndCalloutListener(CDS.java:345)
    at weblogic.jms.common.CDS.access$100(CDS.java:41)
    at weblogic.jms.common.CDS$DDListenerRegistrationTimerListener.timerExpired(CDS.java:193)
    at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
    ... 23 more
    I am using foreign JMS provider with provided mapping. Config follows:
    ejb-jar.xml:
    <enterprise-beans>
              <message-driven>
                   <ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
                   <ejb-class>cz.jaksky.common.async.AsynchronousRequestMessageBean</ejb-class>
                   <transaction-type>Bean</transaction-type>
                   <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
                   <message-driven-destination>
                        <destination-type>javax.jms.Queue</destination-type>
                        <subscription-durability>Durable</subscription-durability>
                   </message-driven-destination>
                   <message-selector>
                        <![CDATA[ Service IN ('PortfolioRetriever')
                      AND MessageType = 'request'
                      AND BigBox = FALSE
                    ]]>
                   </message-selector>
              </message-driven>
         </enterprise-beans>
    weblogic-ejb-jar.xml:
    <weblogic-enterprise-bean>
              <ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
              <message-driven-descriptor>
                   <pool>
                        <max-beans-in-free-pool>64</max-beans-in-free-pool>
                        <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
                   </pool>
                   <destination-jndi-name>wls.AsyncQueue</destination-jndi-name>
                   <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
                   <connection-factory-jndi-name>ServiceLocatorAsyncQueueFactory</connection-factory-jndi-name>
              </message-driven-descriptor>
              <dispatch-policy>PortfolioAsyncQueueWorkManager</dispatch-policy>
         </weblogic-enterprise-bean>
    jmsconfig-jms.xml
    <foreign-server name="TibjmsAsyncServer">
    <default-targeting-enabled>true</default-targeting-enabled>
    <foreign-destination name="AsyncQueue.LOCAL.prgdwm355410.7001">
    <local-jndi-name>wls.AsyncQueue</local-jndi-name>
    <remote-jndi-name>AsyncQueue.LOCAL.prgdwm355410.7001</remote-jndi-name>
    </foreign-destination>
    <foreign-connection-factory name="FTQueueConnectionFactory">
    <local-jndi-name>ServiceLocatorAsyncQueueFactory</local-jndi-name>
    <remote-jndi-name>FTQueueConnectionFactory</remote-jndi-name>
    </foreign-connection-factory>
    <initial-context-factory>cz.jaksky.common.jms.JMSInitialContextFactory</initial-context-factory>
    <connection-url>tcp://JUSD-FTPOIA.jaksky.com:22542,tcp://JUSD-FTPOB.jaksky.com:22543</connection-url>
    </foreign-server>
    Module containing this MDB is packed as an ear file with following structure:
    APP-INF/lib/modules.jar - contains AsynchronousRequestMessageBean class
    APP-INF/lib/interface.jar - contains JMSInitialContextFactory (class used for initial-context-factory)
    portfolio-async.jar
    META-INF/ejb-jar.xml content pasted above
    META-INF/webogic-ejb-jar.xml content pasted above
    Weblogic system classpath doesn't contain any application sepcific libraries.
    This set up was working for weblogic 9 without any problem. I am just wondering what the problem is whether I am faceing class loading issue or JMS configuration issue and how to resolve it.
    Edited by: user13047709 on 18-Sep-2012 07:15
    Edited by: user13047709 on 18-Sep-2012 07:16

    Hi,
    When working with a non-WebLogic JNDI provider (or a non-WebLogic JMS provider), the non-WebLogic client classes must be made available to the classloader of the calling application in WebLogic Server. This is usually accomplished by adding them to the system classpath.
    In your case, WebLogic is looking for a proprietary/foreign JNDI Context Factory class named "cz.jaksky.common.jms.JMSInitialContextFactory", which means you need to make sure that a jar/dir that contains the non-WebLogic class "JMSInitialContextFactory.class" is in the classpath.
    The configuration for this should be similar in WL9 and WL10. It could be that your classpath is already setup to reference the foreign class, but it refers to a directory/jar that you haven't setup yet on your WL10 host.
    HTH,
    Tom

  • Message Bridge or Foreign JMS

              HI
              We are planning to use MQ with our WebLogic setup we are using WL8.1
              and MQ 5.2.
              Just wanted to find out if setting up MQ as a Foreign JMS is better than Bridging.
              The Foreign JMS provider setup seems to be much easier than the bridge.
              Do we get two phase commits with Foreign setup.
              Previously 6.1 sp5 when you setup a bridge with MQ the setup used to complain
              saying that we cannot use the XA adapter with 6.1 and MQ5.2, in 8.1 when we setup
              the driver and create a bridge it does not complain anymore does it mean that
              2PC works with WL8.1 and MQ5.2
              Thanks in Advance.
              Shekar
              

    And yes, you may not need the bridge
              in 8.1 unless your use case demands it. The bridge
              is useful for store-and-forward type designs
              between vendors - for instance, with the bridge
              a sender can still send to MQ even if MQ is down
              as they are sending to a WL queue which is bridged
              to MQ.
              Tom Barnes wrote:
              > Hi Sheckar,
              >
              > XA with MQ works in 6.1, I do not know why you were
              > getting the bridge error message, perhaps you switched
              > MQ versions.
              >
              > Perhaps you are unaware that:
              >
              > MQ5.N supports XA only if the MQ client is running on the
              > same machine as the MQ server.
              >
              > MQ5.(N+1) contains a feature that allows the MQ client to work
              > transactionally remotely. "MQ extended client" or somesuch.
              >
              > I think N is 2, but I'm not sure.
              >
              > Tom
              >
              > Shekar wrote:
              >
              >> HI
              >> We are planning to use MQ with our WebLogic setup we are
              >> using WL8.1
              >> and MQ 5.2.
              >> Just wanted to find out if setting up MQ as a Foreign JMS is better
              >> than Bridging.
              >> The Foreign JMS provider setup seems to be much easier than the bridge.
              >> Do we get two phase commits with Foreign setup.
              >>
              >> Previously 6.1 sp5 when you setup a bridge with MQ the setup
              >> used to complain
              >> saying that we cannot use the XA adapter with 6.1 and MQ5.2, in 8.1
              >> when we setup
              >> the driver and create a bridge it does not complain anymore does it
              >> mean that
              >> 2PC works with WL8.1 and MQ5.2
              >>
              >> Thanks in Advance.
              >> Shekar
              >>
              >>
              >
              

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

  • Foreign JMS between 8.1 and 7.0

              We are experience strange behaviour when we are using foreign JMS between 8.1 and
              7.0. When one MDB on a 8.1 server connects to the JMS on the 7.0 server everything
              is fine. When a second 8.1 server connect to a JMS queue on the 7.0 server the
              it seems to connect but the messages on hanging as pending. If we writes the provider
              URL directly into the MDB descriptor it seems to work. Should foreign JMS work
              between WLS versions? Is there any way to get more debugging information?
              Björn Caroll
              

    It should work. All a "Foreign JMS Provider" is in 8.1 is a way to create
              sort of a "symbolic link" in JNDI between some objects in another JNDI
              provider and the local WLS JNDI tree.
              You can get more info out of the MDB startup process by setting the
              following command-line settings when you start weblogic.Server:
              -Dweblogic.ejb.jms.connect.debug=true
              -Dweblogic.ejb.jms.connect.verbose=true
              (You'll also have to have "StdoutDebugEnabled" set in the "Server" element
              of your config.xml file, or you'll have to turn on that checkbox in the
              console.)
              Also, if you post your MDB deployment descriptors and the ForeignJMS stuff
              from config.xml, we might have some ideas.
              greg
              "Björn Caroll" <[email protected]> wrote in message
              news:3fd6f281$[email protected]..
              >
              > We are experience strange behaviour when we are using foreign JMS between
              8.1 and
              > 7.0. When one MDB on a 8.1 server connects to the JMS on the 7.0 server
              everything
              > is fine. When a second 8.1 server connect to a JMS queue on the 7.0 server
              the
              > it seems to connect but the messages on hanging as pending. If we writes
              the provider
              > URL directly into the MDB descriptor it seems to work. Should foreign JMS
              work
              > between WLS versions? Is there any way to get more debugging information?
              >
              > Björn Caroll
              

  • 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 queue binding problem

              Hi,
              I am on the way to wls7.0 from wls5.1, but I got a probelm when I tried to rebind
              the jms queue to weblogic jndi.
              [javax.naming.ConfigurationException [Root exception is java.rmi.MarshalException:
              failed to marshal rebind(Ljava.lang.String;Ljava.lang.Object;Ljava.util.Hasht
              able;); nested exception is: java.io.NotSerializableException]]
              Can I bind the queue to wls jndi? Anybody has silimar situation?
              Thanks
              

    Hi Jen,
              As TOM said, in your case weblogic interaoperabilty supports only from
              weblogic 5.1 to 6.1, that to specified service packs. you can go through the
              following url
              http://e-docs.bea.com/wls/docs61/interop/interop.html
              So you better go by using message bridges for foreign jms providers. The
              document has how you can configure about JNDI provider either File based Or
              Ldap based.
              Thanks
              Kumar
              "Je" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Thanks, actually I am trying to rebind the jms queue from Fiorano
              > MQ. It works fine in wls5.1. Is there special requirement for jndi for
              wls7.1,
              > does the object needs to be serilizable to be bind into jndi?
              >
              > Tom Barnes <[email protected]> wrote:
              > >
              > >It seems you are trying to access 5.1 JMS from 7.0. WebLogic did not
              > >
              > >support interoperability between versions until 6.1. The classes are
              > >
              > >not compatible. So interop requires a good bit of class-loader magic.
              > >
              > > The only way to interop between JMS 5.1 and 7.0 is to use the
              > >messaging bridge (which does the magic for you).
              > >
              > >FYI: I think that it may be possible to invoke remote 5.1 methods from
              > >
              > >7.0 using the IIOP protocol.
              > >
              > >Tom
              > >
              > >Jen wrote:
              > >> Hi,
              > >> I am on the way to wls7.0 from wls5.1, but I got a probelm when I tried
              > >to rebind
              > >> the jms queue to weblogic jndi.
              > >>
              > >> [javax.naming.ConfigurationException [Root exception is
              java.rmi.MarshalException:
              > >> failed to marshal
              rebind(Ljava.lang.String;Ljava.lang.Object;Ljava.util.Hasht
              > >> able;); nested exception is: java.io.NotSerializableException]]
              > >>
              > >> Can I bind the queue to wls jndi? Anybody has silimar situation?
              > >> Thanks
              > >
              >
              

Maybe you are looking for

  • How to add default value to the Exclude single value in selection screen..

    Hi Experts, i have searched in sdn, but not able to get proper results, in my report i have a selection screen, in that there is a Select-option like status, for this status i need to exclude '02' for this i need to add the default value under exclud

  • Start a Class Action Lawsuite

    My family has fallen subject to the most famous misconception of plan change.  My mother went in to check out new phone options.  Long story short what do you think happened?  Yes, they neglected to explain to her the effects of a plan change.  They

  • Can I create an 'attach files' button in a pdf form?

    Hello, I'm working on a mac and want to create and 'attach files' option to my briefing form. Clients will access the form in reader, attache word documents then submit the form. I have no javascript experience and am not too advanced with Acrobat so

  • Issue Search Help Exit for Material Group

    Dear Expertsl, I developed a search help exit for material group for the search helps both H_T023 and H_2023_MEPO to restrict certain material groups from the actual display as follows 1)  I developed custom table to hold the Invalid material groups

  • Payment Terms Chenged

    Hello to all! somebody changed the payment terms PymntGroup field and made it same with an other one. so a mess of wrong data displayed in my reports. could you pelase tell me how can i find out who made the change?because there is no any Historical