Urgent: WLS 8.1 MDB

          Hi,
          I have a servlet posting Object message to JMS Q. The MDB 's onMessage is executed,but
          it results in the below. I am using WLS 8.1 exploded directory structure. How
          do I mahe MDB locate the classes that are compiled into WEB-INF/classes directory
          weblogic.jms.common.JMSException: Error deserializing object
          at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:144)
          at com.hp.fd2.ReaderBean.onMessage(ReaderBean.java:88)
          at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
          at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
          at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
          at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
          at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
          Caused by: java.lang.ClassNotFoundException: com.hp.fd2.TestObjectPostPrg
          at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:198)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
          at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:223)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:217)
          at weblogic.jms.common.ObjectMessageImpl$ObjectInputStream2.resolveClass(ObjectMessageImpl.java:305)
          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
          at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:13
          

Don't know. Post to the ejb news group, which is
          better suited to handling ejb related questions. In
          the case below, JMS is simply using the EJB's class-loader.
          Note that for URGENT requests, newsgroups are not
          recommended. These groups are not maintained by
          customer support, and response times vary. Use customer
          support, and specify your priority (system down, etc.).
          Tom
          JC wrote:
          > Hi,
          > Any pointers will be appreciated...Thanks
          >
          >
          > "JC" <[email protected]> wrote:
          >
          >>Hi,
          >>I have a servlet posting Object message to JMS Q. The MDB 's onMessage
          >>is executed,but
          >>it results in the below. I am using WLS 8.1 exploded directory structure.
          >>How
          >>do I mahe MDB locate the classes that are compiled into WEB-INF/classes
          >>directory
          >>?
          >>weblogic.jms.common.JMSException: Error deserializing object
          >> at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:144)
          >> at com.hp.fd2.ReaderBean.onMessage(ReaderBean.java:88)
          >> at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
          >> at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
          >> at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
          >> at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
          >> at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
          >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
          >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
          >>Caused by: java.lang.ClassNotFoundException: com.hp.fd2.TestObjectPostPrg
          >> at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:198)
          >> at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
          >> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
          >> at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:223)
          >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
          >> at java.lang.Class.forName0(Native Method)
          >> at java.lang.Class.forName(Class.java:217)
          >> at weblogic.jms.common.ObjectMessageImpl$ObjectInputStream2.resolveClass(ObjectMessageImpl.java:305)
          >> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
          >> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
          >> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
          >> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
          >> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
          >> at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:13
          >
          >
          

Similar Messages

  • WLS 8.1 MDBs, Websphere MQ QMs and Security Exits....

              Hi:
              I am testing an MDB that is listening on a Websphere MQ 5.3 Queue. For security,
              I have secured the Server Connection Channel of the Queue Manager (to which the
              Queue belongs to) with a Security Exit.
              Using the Foreign JMS Servers section in the Admin console, I defined a 'Foreign
              JMS Connection Factory' that has the userid & password that is supposed to be
              passed to Websphere MQ.
              When the MDB comes up, it throws a SecurityException. In the background, the Security
              Exit log indicates that the MDB tried to make multiple connections to the Server
              Channel. The Deployment descriptor has the 'MAX BEANS IN FREE POOL' set to 1.
              My issues are:
              1. When the MDB comes up the Server Connection Channel shows multiple connections.
              I know there is only one MDB, so I am curious why there would be multiple connections
              to the same Channel.
              2. The Security Exit log shows that the userid and passord was passed on to MQ
              certain times and other times it was not. The net result is the Security Exit
              rejected the MDB Connections (when the userid and pwd was blanks) and the Bean
              did not come up properly.
              I am concerned with Issue 2. Because, all I am able to control is giving the userid
              and pwd in the Foreign JMS Server section. WLS 8.1 is supposed to pass on the
              credentials properly to MQ when needed. Is WLS 8.1 NOT doing what is expected
              or am I missing something?
              What is the procedure to deploy a WLS 81 MDB that is listening on a queue whose
              QM is secured by an MQ Security Exit.
              Please help!
              

    When you deploy any EJB or servlet that uses the "resource-reference", the
              container (after a short delay) tries to make a connection to get the
              XAResource for that JMS provider. It then registers that with JTA. That way,
              JTA can perform transaction recovery on the JMS provider sooner rather than
              later. (If we waited to register the MQSeries resource with JTA until you
              used it, then if MQ had prepared transactions, they wouldn't be resolved
              until you actually tried to send a message.)
              As for the "multiple connections", I believe that the MQSeries JMS library
              uses a single MQ "connection handle" for every JMS session. (That's because
              MQ connection handles aren't thread-safe.) In our pool of the JMS Session
              objects, we open more than one session initially, so that might be why
              you're seeing multiple connections.
              You can monitor the pooling of the JMS sessions using the console. Click on
              your server in the "servers" tab in the left-hand tree view, then on
              "Monitoring", then on "JMS", and then on "Monitor Pooled JMS Connections".
              greg
              "Sridhar Krishnaswamy" <[email protected]> wrote in message
              news:[email protected]...
              >
              > I tried the steps you have mentioned. But the userid still does not come
              across
              > to MQSeries. So, I will follow up with Support. The MDB is passing on the
              credentials
              > fine when using the same QCF to put the messages to.
              >
              > On the issue of multiple connections, you are right. The connections are
              because
              > of the resource-ref entries. Though I am not sure why the MDB is actually
              trying
              > to establish multiple connections for every resource-ref entry (because
              the pooling
              > mechanism kicks in?). Also, in my design, some of the resource-ref are
              actually
              > 'stand-bys' to be used only if the MDB fails to put the message using the
              primary
              > resource-ref entry. I would have thought that the physical connections
              will actually
              > be made when the call for looking up the QCF is made by the bean or
              createQueueConnection
              > called. Just for my knowledge, I would like to know why the Container is
              establishing
              > the connections upfront.
              >
              > As always, I really appreciate your help, Greg.
              >
              > Thanks,
              > Sridhar
              >
              > "Greg Brail" <[email protected]> wrote:
              > >At the moment, the username and password used to receive messages come
              > >from
              > >a differenct place, and not from the "Foreign JMS Connection Factory"
              > >screen. (Yes, I realize that this is confusing.) To do what you want,
              > >you
              > >need to define a "credential mapping":
              > >
              > >-- Create a WebLogic Server user using the "security" section of the
              > >console, and assign the password that you will need to connect to MQ.
              > >
              > >-- Right-click on your MDB in the left-hand tree view, and select "Define
              > >Roles and Policies for Individual Beans"
              > >
              > >-- You should see a list of MDBs on the screen. Click on "define
              credential
              > >mapping". (I forget the exact wording, but it's something like that.)
              > >
              > >-- On this screen, you enter the MQSeries username that you'll need to
              > >set,
              > >and the WebLogic user that you created in the first step. It then uses
              > >the
              > >password from this WebLogic username.
              > >
              > >If you have trouble with this, please call support. I know that some
              > >people
              > >have had trouble with this particular feature.
              > >
              > >I'm not sure about the multiple connections. Is it possible that you
              > >have a
              > >"resource-reference" declared for MQ somewhere?
              > >
              > > greg
              > >
              > >"Sridhar Krishnaswamy" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Hi:
              > >> I am testing an MDB that is listening on a Websphere MQ 5.3 Queue.
              > >For
              > >security,
              > >> I have secured the Server Connection Channel of the Queue Manager (to
              > >which the
              > >> Queue belongs to) with a Security Exit.
              > >>
              > >> Using the Foreign JMS Servers section in the Admin console, I defined
              > >a
              > >'Foreign
              > >> JMS Connection Factory' that has the userid & password that is supposed
              > >to
              > >be
              > >> passed to Websphere MQ.
              > >>
              > >> When the MDB comes up, it throws a SecurityException. In the
              background,
              > >the Security
              > >> Exit log indicates that the MDB tried to make multiple connections
              > >to the
              > >Server
              > >> Channel. The Deployment descriptor has the 'MAX BEANS IN FREE POOL'
              > >set to
              > >1.
              > >> My issues are:
              > >>
              > >> 1. When the MDB comes up the Server Connection Channel shows multiple
              > >connections.
              > >> I know there is only one MDB, so I am curious why there would be
              multiple
              > >connections
              > >> to the same Channel.
              > >> 2. The Security Exit log shows that the userid and passord was passed
              > >on
              > >to MQ
              > >> certain times and other times it was not. The net result is the
              Security
              > >Exit
              > >> rejected the MDB Connections (when the userid and pwd was blanks) and
              > >the
              > >Bean
              > >> did not come up properly.
              > >>
              > >> I am concerned with Issue 2. Because, all I am able to control is
              giving
              > >the userid
              > >> and pwd in the Foreign JMS Server section. WLS 8.1 is supposed to pass
              > >on
              > >the
              > >> credentials properly to MQ when needed. Is WLS 8.1 NOT doing what is
              > >expected
              > >> or am I missing something?
              > >>
              > >> What is the procedure to deploy a WLS 81 MDB that is listening on a
              > >queue
              > >whose
              > >> QM is secured by an MQ Security Exit.
              > >>
              > >> Please help!
              > >
              > >
              >
              

  • WLS 6.1 - MDB example -

    1) build.xml - there is an extra '.' in the filename ejb20_message..jar
    2) It doesn't work great with the deployment descriptors - there are two MBD's
    deployed, exampleMessageDriven1 and exampleMessageDriven2. Removing exampleMessageDriven1
    make it work much better.
    Mike

    Clustering configuration problem? Are your two managed servers in a
              cluster? Does the MDB on the other machine complain that it can't connect
              to JMS or find the destination for getting messages?
              _sjz.
              "Ketan B" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Hello all,
              >
              > I have multihomed my NT machine and have
              > deployed the example MDB (listening to
              > a Topic) that comes in the examples
              > directory with WLS 6.1.
              >
              > With the above setup when I use the client
              > class to test the MDB, I see that example
              > MDB being invoked on both the managed server
              > instances.
              >
              > However, if I have one of the managed server
              > on a different machine and I repeat the same
              > test, the MDB is fired only on the machine
              > which hosts the JMS Server.
              >
              > I am little confused by that. The docs state
              > that "If you have an MDB deployed across
              > multiple machines listening on a topic, each
              > deployment will receive a copy of any published
              > message on that topic. You will get multiple
              > copies of the message distributed evenly across
              > all of your MDB deployments. "
              >
              > Any ideas on what I could have possibly missed ?
              >
              > Thanks,
              > Ketan.
              

  • Urgent: WLS 8.1 upgrade to SP3

    Hi all,
    I want to upgrate a productive WLS 8.1 (not SP2) cluster environment to SP 3. There is no chance to upgrade the system over a direct connection to the internet..
    Where can I download the SP3 directly ? Any ideas, hints or links ?
    Any help would be appreciated !
    Thanks,
    Mike

    Please go to support.bea.com and download the appropriate upgrade installer for your OS. You need to be a registered user for this.
    -Vishwas

  • ClassCastException on acknowledge from MDB - foreign Joram JMS

    I have defined a foreign Joram JMS server in WLS. An MDB listens on a topic defined in Joram JMS. I am able to publish messages to this topic and the MDB does receive them. However, on acknowledging the message, WLS throws a ClassCast exception.
              The Joram JARs are listed in the CLASSPATH used to start weblogic. They are not present in the EAR file.
              Stack Trace:
              <Sep 26, 2005 3:17:51 PM MDT> <Error> <Kernel> <BEA-000802> <ExecuteRequest fail
              ed
              java.lang.ClassCastException: org.objectweb.joram.client.jms.TopicSession.
              java.lang.ClassCastException: org.objectweb.joram.client.jms.TopicSession
              at weblogic.ejb20.internal.MDListener$MDMessage.acknowledge(MDListener.j
              ava:722)
              at weblogic.ejb20.internal.MDListener.putListener(MDListener.java:221)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:630)
              at weblogic.ejb20.internal.MDListener.run(MDListener.java:669)
              at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkMan
              agerImpl.java:518)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
              >
              ClassPath used to start WLS:
              CLASSPATH=;C:/joram-4_2_0/ship/lib/JCup.jar;C:/joram-4_2_0/ship/lib/joram-client
              .jar;C:/joram-4_2_0/ship/lib/joram-shared.jar;C:/joram-4_2_0/ship/lib/ow_monolog
              .jar;C:\bea9.0\patch_weblogic901\profiles\default\sys_manifest_classpath\weblogi
              c_patch.jar;C:\bea9.0\JDK150~1\lib\tools.jar;C:\bea9.0\WEBLOG~1\server\lib\weblo
              gic_sp.jar;C:\bea9.0\WEBLOG~1\server\lib\weblogic.jar;;C:\bea9.0\WEBLOG~1\common
              \eval\pointbase\lib\pbclient51.jar;C:\bea9.0\WEBLOG~1\server\lib\xqrl.jar;;C:\be
              a9.0\WEBLOG~1\integration\lib\util.jar;
              Thanks.

    I am also having this exact same issue with Weblogic 9.1. It appears that MDListener$MDMessage is trying to cast the foreign TopicSession into some Weblogic Session class and thus failing.
              Has this been addressed by BEA or are there any work arounds?
              Thanks.

  • Re: AQ/Referenceable Objects work with MDB on WebLogic

              Great work! So you don't have to touch any of Oracle's classes, correct?
              Do you have time to document the whole thing and post it here, including the source
              code of all your custom classes?
              Eric Ma
              "Diptanshu Parui" <[email protected]> wrote:
              >
              >Forgot to add an important point.
              >The extended classes have to in the oracle.jms package (not necessarily
              >in the
              >same jar) to extend the Oracle classes. And I have used aqapi13.jar.
              >
              >Dips
              >
              >"Diptanshu Parui" <[email protected]> wrote:
              >>
              >>Hi,
              >>
              >>After days of work on getting to integrate Oracle's AQ with WebLogic
              >>I have managed
              >>to get to a solution without making changes to the Oracle's AQ API.
              >>
              >>Eric Ma had managed to provide a solution about an year back changing
              >>Oracle's
              >>API and making the AQjmsConnection, AQjmsSession, AQjmsQueueConnectionFactory
              >>& AQjmsDestination NOT implement Referenceable. This solution worked
              >>with WebLogic
              >>but meant that this cannot be deployed on Production environment.
              >>
              >>There was a myth that WebLogic's JNDI didn't provide support to Referenceable
              >>objects like Oracle's AQjmsQueueConnectionFactory etc.
              >>
              >>This myth has been broken. Referenceable object CAN be bound and looked
              >>up from
              >>WebLogic's JNDI provided right Factory classes are written and the correct
              >>constructor
              >>for Reference is used in the getReference method of the Referenceable
              >>implementation.
              >>
              >>In case of Oracle's objects, I wrote classes extending AQjmsQueueConnectionFactory
              >>& AQjmsDestination. In the extended classes, I wrote toString method
              >>and set private
              >>String variable.
              >>This string variable is just special character separated concat of all
              >>parameters
              >>used to call the constructor of the extended class.
              >>Then, in the getReference method of the extended class, I used the following
              >>constructor
              >>of Reference.
              >>
              >>return new Reference( DipsAQQueueConnectionFactory.class.getName(),
              >new
              >>StringRefAddr("value",
              >>value), DipsAQConnectionFactory.class.getName(), null);
              >>
              >>DipsAQQueueConnectionFactory is my class extending AQjmsQueueConnectionFactory
              >>and DipsAQConnectionFactory is the factory class for DipsAQQueueConnectionFactory.
              >>The object value passed in the StringRefAddr above is nothing but the
              >>toString
              >>of the extended class which was stored in the private String variable.
              >>In the
              >>factory class, the string is taken out the StringRefAddr and stripped
              >>to get individual
              >>parameters which were separated by special characters. Once, the individual
              >>parameters
              >>are got back, the Factory class instantiates the Referenceable object
              >>and returns
              >>it back.
              >>
              >>Another important point is in the extended class DipsAQQueueConnectionFactory
              >>I wrote this method
              >> public QueueConnection createQueueConnection() throws JMSException
              >>
              >> {
              >>     return createQueueConnection("user","user");
              >> }     
              >>
              >>And then using a startup class I bound the DipsAQQueueConnectionFactory
              >>& DipsAQDestination
              >>Referenceable objects to WLS. The MDB deployed on WLS was made lookup
              >>for the
              >>bound QF & Q and it started reading AQ messages.
              >>
              >>Few other points to note.
              >>I have kept the user & pwd of WLS same as DB.
              >>I have used OCI driver.
              >>
              >>Please feel free to raise further queries/suggestions.
              >>
              >>Dips
              >
              

              Eric,
              This is the relevant part of the config.xml you were looking for.
                   <JMSDistributedQueue JNDIName="DQueue1" Name="DQueue1" Targets="ClusterTwo" Template="DQueue1">
                        <JMSDistributedQueueMember JMSQueue="Queue1" Name="DQM1"/>
                        <JMSDistributedQueueMember JMSQueue="Queue2" Name="DQM2"/>
                   </JMSDistributedQueue>
                   <JMSBridgeDestination
                        ConnectionFactoryJNDIName="AQJMSConnectionFactory" ConnectionURL="t3://ip:port"
                        DestinationJNDIName="AQJMSQueue" Name="AQJMSDest"/>
                   <JMSConnectionFactory JNDIName="ConnectionFactory" Name="ConnectionFactory"
                        ServerAffinityEnabled="false" Targets="IAServer,ClusterTwo" XAConnectionFactoryEnabled="true"/>
                   <JMSBridgeDestination ConnectionFactoryJNDIName="ConnectionFactory" ConnectionURL="t3://ip:port"
                        DestinationJNDIName="DQueue1" Name="Dest"/>
                   <MessagingBridge Name="MB1" QualityOfService="Duplicate-okay"
                        SourceDestination="AQJMSDest" TargetDestination="Dest"
                        Targets="IAServer,MS1 (migratable),MS2 (migratable),ClusterTwo"/>
              No, I haven't used Oracle's OC4J 10g's AQJMS XA TX support classes.
              cheers!
              Dips
              "Eric Ma" <[email protected]> wrote:
              >
              >Dips:
              >
              >Can you post your config.xml here to show how you set up WLS messaging
              >bridges?
              >
              >Also, have you played with OC4J 10g's AQJMS XA TX support classes?
              >
              >Eric
              >
              >"Diptanshu Parui" <[email protected]> wrote:
              >>
              >>The sample code is now available at
              >>http://dev2dev.bea.com/codelibrary/code/startupclass.jsp
              >>
              >>cheers,
              >>Dips
              >>
              >>
              >>"Diptanshu Parui" <[email protected]> wrote:
              >>>
              >>>Yes, no need to touch Oracle's code at all.
              >>>
              >>>I will post the whitepaper/code soon.
              >>>
              >>>
              >>>"Eric Ma" <[email protected]> wrote:
              >>>>
              >>>>Great work! So you don't have to touch any of Oracle's classes, correct?
              >>>>
              >>>>Do you have time to document the whole thing and post it here, including
              >>>>the source
              >>>>code of all your custom classes?
              >>>>
              >>>>Eric Ma
              >>>>
              >>>>
              >>>>"Diptanshu Parui" <[email protected]> wrote:
              >>>>>
              >>>>>Forgot to add an important point.
              >>>>>The extended classes have to in the oracle.jms package (not necessarily
              >>>>>in the
              >>>>>same jar) to extend the Oracle classes. And I have used aqapi13.jar.
              >>>>>
              >>>>>Dips
              >>>>>
              >>>>>"Diptanshu Parui" <[email protected]> wrote:
              >>>>>>
              >>>>>>Hi,
              >>>>>>
              >>>>>>After days of work on getting to integrate Oracle's AQ with WebLogic
              >>>>>>I have managed
              >>>>>>to get to a solution without making changes to the Oracle's AQ API.
              >>>>>>
              >>>>>>Eric Ma had managed to provide a solution about an year back changing
              >>>>>>Oracle's
              >>>>>>API and making the AQjmsConnection, AQjmsSession, AQjmsQueueConnectionFactory
              >>>>>>& AQjmsDestination NOT implement Referenceable. This solution worked
              >>>>>>with WebLogic
              >>>>>>but meant that this cannot be deployed on Production environment.
              >>>>>>
              >>>>>>There was a myth that WebLogic's JNDI didn't provide support to
              >Referenceable
              >>>>>>objects like Oracle's AQjmsQueueConnectionFactory etc.
              >>>>>>
              >>>>>>This myth has been broken. Referenceable object CAN be bound and
              >>looked
              >>>>>>up from
              >>>>>>WebLogic's JNDI provided right Factory classes are written and the
              >>>>correct
              >>>>>>constructor
              >>>>>>for Reference is used in the getReference method of the Referenceable
              >>>>>>implementation.
              >>>>>>
              >>>>>>In case of Oracle's objects, I wrote classes extending AQjmsQueueConnectionFactory
              >>>>>>& AQjmsDestination. In the extended classes, I wrote toString method
              >>>>>>and set private
              >>>>>>String variable.
              >>>>>>This string variable is just special character separated concat
              >of
              >>>>all
              >>>>>>parameters
              >>>>>>used to call the constructor of the extended class.
              >>>>>>Then, in the getReference method of the extended class, I used the
              >>>>following
              >>>>>>constructor
              >>>>>>of Reference.
              >>>>>>
              >>>>>>return new Reference( DipsAQQueueConnectionFactory.class.getName(),
              >>>>>new
              >>>>>>StringRefAddr("value",
              >>>>>>value), DipsAQConnectionFactory.class.getName(), null);
              >>>>>>
              >>>>>>DipsAQQueueConnectionFactory is my class extending AQjmsQueueConnectionFactory
              >>>>>>and DipsAQConnectionFactory is the factory class for DipsAQQueueConnectionFactory.
              >>>>>>The object value passed in the StringRefAddr above is nothing but
              >>>the
              >>>>>>toString
              >>>>>>of the extended class which was stored in the private String variable.
              >>>>>>In the
              >>>>>>factory class, the string is taken out the StringRefAddr and stripped
              >>>>>>to get individual
              >>>>>>parameters which were separated by special characters. Once, the
              >>individual
              >>>>>>parameters
              >>>>>>are got back, the Factory class instantiates the Referenceable object
              >>>>>>and returns
              >>>>>>it back.
              >>>>>>
              >>>>>>Another important point is in the extended class DipsAQQueueConnectionFactory
              >>>>>>I wrote this method
              >>>>>> public QueueConnection createQueueConnection() throws JMSException
              >>>>>>
              >>>>>> {
              >>>>>>     return createQueueConnection("user","user");
              >>>>>> }     
              >>>>>>
              >>>>>>And then using a startup class I bound the DipsAQQueueConnectionFactory
              >>>>>>& DipsAQDestination
              >>>>>>Referenceable objects to WLS. The MDB deployed on WLS was made lookup
              >>>>>>for the
              >>>>>>bound QF & Q and it started reading AQ messages.
              >>>>>>
              >>>>>>Few other points to note.
              >>>>>>I have kept the user & pwd of WLS same as DB.
              >>>>>>I have used OCI driver.
              >>>>>>
              >>>>>>Please feel free to raise further queries/suggestions.
              >>>>>>
              >>>>>>Dips
              >>>>>
              >>>>
              >>>
              >>
              >
              

  • MQ 5.3 and WLS 8.1

              I want to use MQ 5.3 from WLS 8.1 MDBs. Seems like I can
              a) configure MQ as a foreign jms service, or
              b) use a JMS bridge.
              Is there a difference? From the documentation it seems as though the bridge offers
              superior transactional semantics. If I use a bridge do I configure MQ to register
              objects in some other local file or LDAP JNDI repository, then bridge from that
              JNDI to WLS JNDI?
              I'm confused about this whole thing, so I apologize if my question doesn't make
              sense. Does anyone have an explicit example they can share?
              Thanks,
              Jay
              

    Hi Jay,
              - Unless your intent is to allow MDBs to continue
              processing backlogged messages while MQ is
              off-line, there is usually little reason
              to use a bridge. A bridge
              introduces an extra hop which increases latency and
              may decrease performance.
              - I assume you will also want to send from WL
              to MQ. If so, look into the new 8.1 resource
              reference wrapper feature as it helps simplify
              this task. You may want to bridge from
              a local dest to MQ instead,
              for the same reasons as one would bridge in
              the inbound direction - to allow message
              processing to continue even if MQ is down...
              - If you use the bridge there is no need to
              configure foreign destination or connection
              factory "wrappers", as you can specify
              the MQ URL, CF name, and dest name directly in
              the bridge configuration. Ditto for MDB
              descriptors. But foreign wrappers are nice for
              MDBs as then the MQ URL, CF name,
              and dest name no longer need to be hard-coded
              into the MDB and instead reside in the config.xml...
              - I'm attaching some notes I have on
              integration which contains some additional information.
              Tom
              jay philoon wrote:
              > I want to use MQ 5.3 from WLS 8.1 MDBs. Seems like I can
              > a) configure MQ as a foreign jms service, or
              > b) use a JMS bridge.
              >
              > Is there a difference? From the documentation it seems as though the bridge offers
              > superior transactional semantics. If I use a bridge do I configure MQ to register
              > objects in some other local file or LDAP JNDI repository, then bridge from that
              > JNDI to WLS JNDI?
              >
              > I'm confused about this whole thing, so I apologize if my question doesn't make
              > sense. Does anyone have an explicit example they can share?
              >
              > Thanks,
              > Jay
              Transactional Integration of Foreign JMS Vendors with BEA WebLogic Server
              The following notes are derived mostly from "http://dev2dev.bea.com/technologies/jms/index.jsp".
              For additional questions, a good forum for WebLogic questions in general is "newsgroups.bea.com". These can be mined for information by using Google's newsgroup search function.
              Feature Overview
              - For a foreign JMS vendor to participate in a WL transaction it must support XA. Specifically, it must support the javax.jms.XA* interfaces.
              - In WL versions 6.0 and up it is possible to make synchronous calls to foreign JMS vendors participate in a WL transaction as long as the foreign vendor supports XA.
              - WL 6.0 and 6.1 MDBs can be driven by foreign vendors non-transactionally. They can be driven transactionally by a select few foreign vendors (MQ is not part of the select few)
              - WL 7.0 and later, MDBs can be driven by foreign vendors transactionally and non-transationally.
              - WL 6.1 and later WL provides a messaging bridge feature. Messaging bridges forward messages between any two JMS destinations, including foreign destinations, and can transfer messages transactionally or non-transactionally.
              - WL 8.1 JMS provides additional features that simplify transactional and JNDI integration of foreign vendors. See http://edocs.bea.com/wls/docs81/jms/intro.html#jms_features
              Integration with 8.1 Details
              A good overview of 8.1 JMS interop capability is the presentation "Integrating Foreign JMS Providers with BEA WebLogic Server" here:
              http://www.bea.com/content/files/eworld/presentations/Wed_03_05_03/Application_Servers/1097-Foreign_JMS_Providers_WLS.pdf
              This document refers to helpful new 8.1 features, which simplify integration. These include:
              http://edocs.bea.com/wls/docs81/ConsoleHelp/jms_config.html#accessing_foreign_providers
              http://edocs.bea.com/wls/docs81/jms/j2ee_components.html#1033768
              And are also summarized here (under interoperability):
              http://edocs.bea.com/wls/docs81/jms/intro.html#jms_features
              The 8.1 features are likely sufficient for most 8.1 integration needs, and you may not need to refer "Using Foreign JMS Providers With WLS" white-paper mentioned below.
              Integration with 6.1 and 7.0 Details
              Read the "Using Foreign JMS Providers With WLS" white-paper:
              http://dev2dev.bea.com/products/wlserver/whitepapers/jmsproviders.jsp
              Note that this white-paper does not take into account 8.1 features.
              MQ Remote Capable XA Clients
              Until recently, IBM MQ JMS clients could not work transactionally unless they were running on the same host as their MQ server. This is a limitation unique to MQ that was relaxed with the introduction of IBM's new "WebSphere MQ Extended Transactional Client". See:
              http://publibfp.boulder.ibm.com/epubs/pdf/csqzar00.pdf
              The product is new, and for some reason, configuration of this client seems to be tricky, even when WebLogic is not involved at all. Oddly, the main sticking point seems to be simply making sure that class paths refer to the required IBM jars:
              - Required on WLS where MQ objects are bound into JNDI:
              com.ibm.mq.jar, com.ibm.mqjms.jar
              - Required only if MQ objects are bound into JNDI on a different server:
              com.ibm.mq.jar
              If there are problems when using this client, first get it to work using a pure IBM client without any BEA classes involved. Once that is working, search the WL JMS newsgroup for answers and/or contact BEA customer support.
              MDB Thread Pool Notes
              WL7.0SP? and WL8.1 and later support the "dispatch-policy" field to specify which thread pool an MDB uses to run its instances. In most cases this field should be configured to help address potential performance issues and/or dead-locks:
              http://edocs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html#dispatch-policy
              (Note that "dispatch-policy" is ignored for non-transactional foreign vendors; in this case, the MDB "onMessage" callback runs in the foreign vendor's thread.)
              MDB Concurrency Notes
              Queue MDBs driven by foreign providers can run multiple instances concurrently. Topic MDBs driven by foreign providers are limited to one instance (not sure, but transactional foreign driven topic MDBs may not have this limitation). The size of the thread pool that the MDB runs in and the "max-beans-in-free-pool" descriptor limit how many instances run concurrently.
              Performance Tuning Notes
              The "WebLogic JMS Performance Guide" white-paper contains detailed performance design and tuning information for the Messaging Bridge, JMS, and MDBs.
              http://dev2dev.bea.com/products/wlserver/whitepapers/WL_JMS_Perform_GD.jsp
              

  • Using MDBs for durable subscriptions

    I need to be able to deploy my MDB as a durable subscriber i.e I have my MDB ubscribing to a Topic. For some reason if the application hosting the MDB(message driven bean) fails, I would like the JMS provider to republish all the messages that were already in the Topic in addition to those messages which might have been published when the MDB application was down.
    I am trying to achieve this using Weblogic 7.0. The weblogic documentation says that messages will not be accumulated if the MDB using durable subscriptions is not deployed(which would be the case when the MDB application failed).
    Any ideas on how I could design around this shortcoming within WLS?
    Thanks
    Ramdas

    The WLS documentation for MDBs says :
    "If your bean will demarcate its own transaction
    boundaries, set the acknowledge-mode sub-element to
    specify the JMS acknowledgment semantics to use. This
    element has two possible values: AUTO_ACKNOWLEDGE (the
    default) or DUPS_OK_ACKNOWLEDGE."Okay, I missed the part where you were specifying WLS. In the case quoted above, you will have to explicitly rollback the transaction and make sure that your MDB is set to transaction "Required" (or "RequiresNew").
    I am not sure what you meant by "concurrency issues"
    when using MDBs.
    Please could you clarify.Sure, if your BMP, as called from the MDB, blows up, you rollback the transaction. Which means the EXACT SAME message that caused the error will get redelivered, based upon your server settings: either immediately or within the delay period.
    This means that while your first MDB is (potentially) still dealing with whatever problems the message caused in the BMP, a second invocation of the MDB can be starting, albeit in another transaction. The state of your BMP could be undefined in this situation - which could cause an entirely different set of problems.
    Even though you program EJBs as "single-threaded," you still have to consider the likelyhood of multiple invocations accessing/changing the same "piece" of data. Yes, that's what transactions are for - but there can be programmatic holes where this kind of situation can arise. You just have to be careful about what you're doing.

  • Porting EJB 3 MDB from OC4J to WLS

    Posting this again since my last post didn't seem to take.
    I get the following three deployment error messages when attempting to deploy an application to WebLogic Server 10.3 technical preview. The problem is centered around my deployment of an EJB 3 message driven bean.
    1. An error occurred during activation of changes, please see the log for details.
    2. Exception preparing module: EJBModule(EngineEjb.jar) Unable to deploy EJB: Requestor from EngineEjb.jar: [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation. at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:246) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1013) at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:907) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1211) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:387) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:381) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:517) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    3. Substituted for missing class [EJB - 11026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
    My MDB uses an annotation like the following:
    @MessageDriven(mappedName = "jms/demoQueue", name = "MyMDB",
    activationConfig =
    @ActivationConfigProperty(propertyName = "destinationType",
    propertyValue = "javax.jms.Queue")
    @ActivationConfigProperty(propertyName = "messageSelector", propertyValue =
    "RECIPIENT = 'MyRecipient'")
    Earlier, I did create a JMS Module named demoQueue with the following resources:
    Name Type JNDI Name
    testQueue Queue jms/demoQueue
    ConnectionFactory-0 Connection Factory jms/QueueConnectionFactory
    Any suggestions to fix the WLS deployment error?
    For continuing compatibility with my OC4J deployment, I would like to continue using a connection factory with the following JNDI name "jms/QueueConnectionFactory" shown above.
    So I plan to add the following properties to the @MessageDriven annotation above. These are needed to continue working with our OC4J deployment. However, my primary concern is to get this MDB working with WLS. Does this strategy seem reasonable for allowing deployment to both OC4J and WLS?
    @ActivationConfigProperty(propertyName = "connectionFactoryJndiName",
    propertyValue =
    "jms/QueueConnectionFactory") ,
    @ActivationConfigProperty(propertyName = "destinationName", propertyValue =
    "jms/demoQueue")
    Thanks,
    Travis

    Travis, you pose a very good question. If I understand your goal, you would like to use code that compiles and works in OC4J and WLS. For example, you want to use javax.ejb.MessageDriven instead of weblogic.ejbgen.MessageDriven.
    Using something like mappedName as it is referred to here allows you specify the JNDI name in WLS if it is not defined elsewhere, but it appears to be specific to the WLS implementation.
    I've seen several other questions posed about finding all of the available ActivationConfigProperty name / value pairs and I have been unable to find it myself.
    I tried several permutations of annotations, and I can't figure out why something like this would even work, but it does. The mapped name is my JNDI name, but I never specify that it is a javax.jms.Queue or which connection factory to use. How does WLS figure that out?
    @MessageDriven(     
         mappedName = "exampleQueue", name = "HelloWorldMDB"
    public class HelloWorldMDB implements MessageListener {
         @Override
         @TransactionAttribute(value = javax.ejb.TransactionAttributeType.REQUIRED)
         public void onMessage(Message message) {
              System.out.println( "received message " + message );
    }This is a good question for support as the documentation seems to be incomplete here.

  • MDB with foreign JMS : WLS 9.23

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

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

  • A startup class to enable MQ Queues to trigger MDBs in WLS 6.1(sp4)

              Hi,
              I am hoping for references to documentation or opinions on the following method
              allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
              the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
              with MQs connection factory.
              I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
              in a startup class will not allow MDBs to be linked to an MQ queue because startup
              classes are run after MDB deployment during startup. However I found some unused
              in-house code which appeared to do just that and it works.
              Here is the code in abbreviated form:
              public String startup(String str, Hashtable args) throws Exception
                   bindMQFactory();
                   bindMQQueues();
                   return "";
              private void bindMQFactory() throws Exception
                   // Create MQ Factory and configure it
                   MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
                   factory.setChannel(channel );
                   factory.setHostName(host);
                   factory.setPort(Integer.parseInt(port));
                   factory.setQueueManager(qmanager);
                   factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
                   // bind connection factory into WLS JNDI for later use by clients
                   _wlsContext.bind( connectionFactoryJndi, factory );
                   // Force mq connection factory to be the one used for mdb's
                   _wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
              private void bindMQQueue() throws Exception
                   // create queue and configure it
                   MQQueue queue = new MQQueue();
                   queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
                   queue.setBaseQueueName( mqQueueName );
                   // bind queue in WLS JNDI
                   _wlsContext.bind( wlsJndi, queue );
              Thanks in advance for any comments or opinions on the above.
              regards
              Martin
              

    Start with the white-paper:
              "Using Foreign JMS Providers with WebLogic Server"
              Note that to get transactional behavior you
              will need to use the WebLogic Messaging Bridge feature.
              Note that integrating MQ is easier in 8.1 - consider
              using WL 8.1 if you can.
              One more comment in-line.
              Martin wrote:
              > Hi,
              >
              > I am hoping for references to documentation or opinions on the following method
              > allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
              > the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
              > with MQs connection factory.
              Not recommended. Highly not recommended. Do not use the same name
              as the internal factory. Create your own name for a CF, and change the
              weblogic ejb jar to reference your name. The above white-paper
              states how to do this.
              >
              > I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
              > in a startup class will not allow MDBs to be linked to an MQ queue because startup
              > classes are run after MDB deployment during startup. However I found some unused
              > in-house code which appeared to do just that and it works.
              >
              > Here is the code in abbreviated form:
              > public String startup(String str, Hashtable args) throws Exception
              > {
              >      bindMQFactory();
              >      bindMQQueues();
              >
              >      return "";
              > }
              >
              > private void bindMQFactory() throws Exception
              > {
              >
              >      // Create MQ Factory and configure it
              >      MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
              >      factory.setChannel(channel );
              >      factory.setHostName(host);
              >      factory.setPort(Integer.parseInt(port));
              >      factory.setQueueManager(qmanager);
              >      factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
              >
              >      // bind connection factory into WLS JNDI for later use by clients
              >      _wlsContext.bind( connectionFactoryJndi, factory );
              >
              >      // Force mq connection factory to be the one used for mdb's
              >      _wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
              > }
              >
              > private void bindMQQueue() throws Exception
              > {
              >      // create queue and configure it
              >      MQQueue queue = new MQQueue();
              >      queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
              >      queue.setBaseQueueName( mqQueueName );
              >
              >      // bind queue in WLS JNDI
              >      _wlsContext.bind( wlsJndi, queue );
              > }
              >
              > Thanks in advance for any comments or opinions on the above.
              >
              > regards
              >
              > Martin
              

  • WLS 10 MDB migration within a WLS cluster

    Hi,
    I'm trying to get MDB migration working. From my reading in the documentation regarding this topic, it appears that I have to deploy my MDB to all of the cluster server instances.
    Ex, if the JMS server that my MDB is using is on a migratable target and it composes of srv1 and srv2, then I also have to deploy my MDB to srv1 and srv2 in order to get some form of "migration" working.
    What I want to know is if it's possible to do a real migration like migrating JMS service for example? Instead of doing this multiple deployment of my MDB.
    this snippet from http://edocs.bea.com/wls/docs100/ejb/message_beans.html#wp1168630 seems to be talking about the above setup.
    MDBs do not have migratable targets. Instead, an MDB automatically detects the JMS Server migration target during deployment, and uses that as its migratable target. You must ensure that MDB are deployed everywhere that a JMS Server is deployed. You can do this in two ways:
    * Deploy MDBs homogeneously to the cluster.
    * Match an MDB’s targets to the JMS migratable target list in the config.xml file for the server instance’s cluster. The MDB target server name must match the JMS migratable target list, or MDB migration will fail. For more information on configuring migratable targets, see “Defining Migratable Target Servers in a Cluster” in Using WebLogic Server Clusters.

    Hi,
    Thanks for the information.
    Can you explain why this is happening though?
    I have a distributed queue with two members (or specifically two JMS servers), which is targetted across the cluster (two servers cluster).
    I have 1 MDB that is targetted to one of the JMS server in the distributed queue.
    I deployed the MDB to the whole cluster. During monitoring, I noticed that two copies of the MDB are resident at startup (1 active on the cluster instance where the JMS server is hosting the source destination; the other is active residing on the other cluster instance). When I manually migrate the JMS server, the MDBs' status just switch due to one able to connect while the other cannot connect anymore.
    So, this is what's to be expected of MDB migration, correct? In this simple scenario for example, there will always be 1 resident running/suspended copy of the MDB in memory within each cluster server instance. The MDB migration is just simply switching between one cluster instance's resident MDB to another instance's.
    Is this correct?
    Thanks.

  • WLS - MDB & Credential Mappings

    Hi all,
    I've an EAR application that contains some MDB EJBs and for MDB authentication I configured for each of them the Credential Mappings tab under Security section.
    It works well. For the configuration I used the WLS console but now I need to automatize this process. I've stored those credential mappings info in a properties file and I'm trying to find out how to use WLST to create/update directly the MDB credential mappings.
    Do you sugget to do that in a different way without using WLST ? We have different environments where we have to promote the sw and doing that manually could introduce mistakes ...
    Do you have any example or hint ?
    Thanks in advance
    ferp

    Hi all,
    I've an EAR application that contains some MDB EJBs and for MDB authentication I configured for each of them the Credential Mappings tab under Security section.
    It works well. For the configuration I used the WLS console but now I need to automatize this process. I've stored those credential mappings info in a properties file and I'm trying to find out how to use WLST to create/update directly the MDB credential mappings.
    Do you sugget to do that in a different way without using WLST ? We have different environments where we have to promote the sw and doing that manually could introduce mistakes ...
    Do you have any example or hint ?
    Thanks in advance
    ferp

  • R2_AQ_JMS MDB deployment Error--Urgent, please help!!

    Deploy a simple MDB to Oracle9iASR2, follow the steps:
    1. Define the MDB in ejb-jar.xml
    <message-driven>
    <description>MDB Queue Listener</description>
    <display-name>QueueListener Message Driven Bean</display-name>
    <ejb-name>QueueListenerMDB</ejb-name>
    <ejb-class>mdb.QueueListenerMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <jms-destination-type>javax.jms.Topic</jms-destination-type>
    </message-driven-destination>
    </message-driven>
    2. Modify the orion-ejb-jar.xml
    <message-driven-deployment
    name="QueueListenerMDB"
    destination-location="jms/SalesTopic"
    connection-factory-location="jms/theTopicConnectionFactory"
    subscription-name="MDBSUB"
    >
    </message-driven-deployment>
    3. define the resource-provider in application.xml
    <resource-provider class="oracle.jms.OjmsContext" name="SalesJMS">
    <description> OJMS/AQ </description>
    <property name="url" value="jdbc:oracle:thin:@dell2400:1521:mydb"></property>
    <property name="username" value="user"></property>
    <property name="password" value="pssword"></property>
    </resource-provider>
    4. Deploy the ear file and got the following error:
    java.lang.NullPointerException
    at com.evermind.server.ejb.MessageDrivenHome.<init>(MessageDrivenHome.java:280)
    at com.evermind.server.ejb.EJBPackageDeployment.bindHomes(EJBPackageDeployment.java:239
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:589)
    at com.evermind.server.Application.postInit(Application.java:420)
    at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplic
    ationInstallation.java:491)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Any idea on what's the cause of this. It seems that the Oracle 9i's support of MDB differs significantly from R1. The demo sample that works for R1 no longer work for R2. For example, the following DD doesn't seem to work with R2.
    <resource-ref>
    <res-ref-name>jms/Queue/senderQueueConnectionFactory</res-ref-name>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>jms/Queue/senderQueue</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
    </resource-env-ref>
    <resource-ref>
    <res-ref-name>jms/Topic/senderTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    Please help!! This is very urgent! Thanks in advance!

    <jms-destination_type> tag should be <destination-type> its a oracle error

  • Error connecting WLS 10.3.1 JMS & MDBs with Oracle Advanced Queuing

    I followed the guide at http://blogs.oracle.com/imc/2010/12/how_to_use_oracle_aq_with_message-driven_beans_in_weblogic.html. Since the AQ queues were already set up by SAs and had been working with stateless session beans, I assume they're OK for use with MDBs. Names had to be changed in the WLS foreign server definition, destinations & connection factories to match.
    My MDB is:
    package xxxx;
    import javax.ejb.MessageDriven;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.TextMessage;
    @MessageDriven(name = "TestQueueListenerEJB")
    public class TestQueueListener implements MessageListener
    public void onMessage(Message message)
    if ( message instanceof TextMessage )
    try
    System.out.println("AQMDBTest: text message " + ((TextMessage)message).getText() + " processed");
    catch (JMSException e)
    e.printStackTrace();
    else
    System.out.println("AQMDBTest: generic message " + message.toString() +
    " of type " + message.getClass().getName() + " processed");
    And the relevant portion of the weblogic-ejb-jar.xml is:
    <weblogic-enterprise-bean>
    <ejb-name>TestQueueListenerEJB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>1</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>TestQueue</destination-jndi-name>
    <connection-factory-jndi-name>TestQueueConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    So when I deploy this to my test domain I get an error:
    <Feb 23, 2011 3:11:28 PM CST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: TestQueueListenerEJB is unable to connect to the
    JMS destination: TestQueue. The Error was:
    Can not get destination information. The destination JNDI name is TestQueue, the provider URL is null>
    The test connection of the datasource is successful.
    What else could I have wrong? This is my first post to this topic. Please let me know what additional information I need to provide about this. Or if I've provided too much.
    Thanks very much,
    Jim Greetham

    OK. So I got my DBAs to create a new user with the necessary privs. Created a new queue, table, etc. I have been able to receive messages from it. So I have some looking to do in my production database queue definitions.
    Jim

Maybe you are looking for