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.
          

Similar Messages

  • Error running A Simple MDB example with oc4j

    Hi All,
    I am new to OC4J, I am trying the example for MDB from OTN's site, A Simple MDB example with OC4J. When I start my OC4J on the command line > java -jar oc4j.jar
    I get the following exception:
    Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar homes: No lo
    cation set for Topic resource MessageDrivenBean MDB
    Error in application mdb: Error loading package at file:/C:/unzipped/mdb_hello_w
    orld/build/mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:40 Error instantiating application 'mdb' at file:/C:/unzipped/mdb
    helloworld/build/mdb.ear: Error initializing ejb-module; Exception Error in ap
    plication mdb: Error loading package at file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar
    homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:41 Error starting HTTP-Server: Address already in use: JVM_Bind
    04/07/09 15:21:41 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    initialized
    I have just followed all the steps provided to run the example exactly as given.
    I did add my Topic and TopicConnectionFatory entries in my jms.xml -
    <topic name="The Topic" location="jms/theTopic">
    <description>A MDB topic</description>
    </topic>
    <topic-connection-factory location="jms/theTopicConnectionFactory" />
    Here is the ejb-jar.xml given in the example:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar>
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <description>My message driven bean</description>
    <ejb-name>MDB</ejb-name>
    <ejb-class>MDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    <resource-ref>
    <description>The log topic where log events are broadcasted...</description>
    <res-ref-name>jms/theTopic</res-ref-name>
    <res-type>javax.jms.Topic</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
    <description>The Factory used to produce connections to the log topic...</description>
    <res-ref-name>jms/theTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MDB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Here is my orion-ejb-jar.xml:
    <?xml version="1.0"?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar deployment-version="1.0.2.2" deployment-time="e7f5a3f42d">
    <enterprise-beans>
    <message-driven-deployment name="MDB" destination-location="jms/theTopic" connection-factory-location="jms/theTopicConnectionFactory">
    <resource-ref-mapping name="jms/theTopic" />
    <resource-ref-mapping name="jms/theTopicConnectionFactory" />
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role&gt;" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    I don't know what is wrong. Please help me.
    Rohini

    Hello,
    I guess that you didn't define the Topic and/or TopicConnectionFactory on your OC4J
    Inside $J2EE_HOME/config (see: subfolders .../j2ee/home/config e.g.)folder are several xml files appropriate for OC4J configuration. There's also jms.xml. Please, verify this one, it should have some entries for your settings.
    Just like in an example below:
    <topic-connection-factory name="TopicConnectionFactory" location="jms/TopicConnectionFactory"/>
    <topic name="theTopic" location="jms/theTopic"/>
    The names should be the same like in your MDB deployment descriptors. It works of course after next OC4J server restart.
    I hope helped you
    Krzysztof

  • How deploy MDB example to SAP J2EE 6.20

    Hi,
    I need to <b>deploy a message driven bean to SAPJ2ee6.20</b>, , and for that first i tried to deploy MDB example(.ear file) from SAPj2ee Installation.
    But at deployment phase, it generate exception.
    How can i do this with succes?
    Thanks a lot,

    Hi Bogdan,
    please, do <i>not</i> post the same question three times into different categories - beneath, all three categories have been wrong, this is a deployment question not concerning EP or Java directly nor 6.40 preview, so you should have posted it to "WAS general".
    <i>No</i>, please do <i>not</i> post it a fourth time... People will read it, and if there shouldn't be an answer...
    It is frustrating for people who want to help to read "it generates an exception" - yeah, <i>which one</i>?!
    Thanks for considering these hints in the future
    Detlev

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

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

  • WLS 6.0 beta2(Examples Server and Default Domain)

    Hello
    I have downloaded Weblogic server v6.0 beta2
    Is it possilbe start examples server as Managed server to mydomain(myserver as admin server). If possilbe how do i do it......
    In "mydomain" through console I created a new new server myserver-1.How do I start and stop myserver-1. When ever you create a new server in the console does it become automatically the managed server.
    I would appreciate if some one could clear my confusion...
    Thanks in advance
    Arun

    Hello
    I have downloaded Weblogic server v6.0 beta2
    Is it possilbe start examples server as Managed server to mydomain(myserver as admin server). If possilbe how do i do it......
    In "mydomain" through console I created a new new server myserver-1.How do I start and stop myserver-1. When ever you create a new server in the console does it become automatically the managed server.
    I would appreciate if some one could clear my confusion...
    Thanks in advance
    Arun

  • Any working MDB examples with 9.2.0.3? AQ? OJMS

    Does anyone have a working MDB app for app server version 9.2.03 and database 9.2.0.1.0 ???
    I realize the messagelogger app is not compatible; I also am having problems with the MDB sample from Wrox ch19.
    In general, I am very confused about which JMS provider is supplied with this release and what is supposed to work with it. If anyone can give a clearer picture of oracle's JMS status, please do so. I have read the release notes and have just gotten more confused. OJMS vs. Oracle JMS vs. OC4J/JMS... what is what here. Also, how does Advanced Queueing (AQ) fit into the picture? Is it required with this release?
    Thanks for any info on these questions.
    Allan

    Hi Stefan,
    Exactly which Java component did the installation stop at, and if you go to the end of the install log (install log is in oraInventory/logs directory, it's named installActions<date>.log), what does it say?
    If you forgot to set LD_ASSUME_KERNEL to "2.4.1", the installer will stop right at the beginning when it starts copying files. This is because although the installer is a Java app, it calls native shared libraries via JNI to perform OS operations like copying files or changing file permissions. Those shared libraries were compiled against an earlier version of glibc.
    The only places where relinking stopped for me were at oemagent and at a ctx agent. The ctx agent has a fix which is well known. The oemagent cannot be fixed without hacking glibc source code and recompiling I think. I haven't had time to try that yet.
    Cheers,
    Dave

  • Using Weblogic MDB to consume message using a XA transaction with third party JMS Provider

              I understood from the WebLogic documentation that we can invoke a third party JMS
              using its XA interface from within a MDB where transaction-type is Container and
              trans-attribute is Required. Also we will need to specify its XAConnection factory
              name as connection-factory-jndi name. It that sufficient ?? Or do i need to set
              up some other attributes also ??.
              

              Hi Neeru,
              I understand u were able to solve this issue.
              I am using similar kind of configuration but instead of tibco i am using Webmethods.
              Could u please let me know what did u do to solve the problem?
              -thanks and regards.
              Praveen
              "Neeru Munjal" <[email protected]> wrote:
              >
              >Hi Rob,
              >I used the same whitepaper and tried to use TIBCO JMS with Weblogic server),
              >I
              >started with MDB example specified in Weblogic 7.0 release in examples/ejb20/message
              >and modified it to use trans-attribute as Required. Also I used connection
              >factory
              >which supports XA, but my MDB does not get called.
              >
              >Thanks & Regards
              >Neeru
              >
              >Rob Woollen <[email protected]> wrote:
              >>Here's a white paper about integrating 3rd party JMS providers with
              >WLS:
              >>
              >>http://dev2dev.bea.com/resourcelibrary/whitepapersdetail.jsp?highlight=whitepapers&filePath=components%2Fdev2dev%2Fresourcelibrary%2Fwhitepapers%2Fwp_jmsproviders.htm
              >>
              >>-- Rob
              >>
              >>Neeru Munjal wrote:
              >>> I understood from the WebLogic documentation that we can invoke a
              >third
              >>party JMS
              >>> using its XA interface from within a MDB where transaction-type is
              >>Container and
              >>> trans-attribute is Required. Also we will need to specify its XAConnection
              >>factory
              >>> name as connection-factory-jndi name. It that sufficient ?? Or do
              >i
              >>need to set
              >>> up some other attributes also ??.
              >>>
              >>
              >
              

  • 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
              

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

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

  • BEA WLS and OraclePoolConnection

    Hi,
    Using the Oracle (9i) JDBC OCI driver, i am trying to get a proxy
    connection going in BEA WLS.
    If i define the connection pool using the Oracle classes in my program
    everything is fine (i can get a connection and then proxy as as another
    user). But if I define the pool using the Weblogic console then I have a
    ClassCastException after doing a the lookup().
    InitialContext initial = new InitialContext();
    // HERE the classcastexception :
    OracleOCIConnectionPool ds =
    (OracleOCIConnectionPool) initial.lookup("jdbc/OracleOciDS");
    oracle.jdbc.OracleConnection conn = null;
    Properties p = new Properties();
    p.setProperty(PROXY_USER_NAME, username);
    conn = ds.getProxyConnection( PROXYTYPE_USER_NAME, p);
    OracleOciDS is an OCI Connection pool (defined via the WLS console) and it's
    working ok if I don't try to use the ProxyConnection mechanism of the JDBC
    OCI.
    If I do everything "by hand" without defining the Datasource in the BEA WLS console (using Oracle example), it's ok but the best would be to use the BEA console to do the administration and monitoring of the pool.
    Thanks.
    Real Gagnon from Quebec, Canada
    * Looking for Java or PowerBuilder snippets ? Visit Real's How-to
    * http://www.rgagnon.com/howto.html
    * http://www.rgagnon.com/bigindex.html

    Hi,
    I am facing the same problem. Any luck on this?

  • MDB using AQ

    Hi,
    I am trying to deploy the MDB example using OC4J 9.0.3
    and database 9.0.1.
    I am getting an error
    j2ee/home/applications/messagelogger/messagelogger-ejb.jar
    homes: No javax.jms.Destination found at the
    specified destination-location
    (java:comp/resource/mdbjms/Topics/theTopic)
    for MessageDrivenBean MessageLogger
    I did read the message which describes how to set all this up.
    http://forums.oracle.com/forums/message.jsp?id=782562
    application.xml is
    <resource-provider
    class="oracle.jms.OjmsContext" name="mdbjms">
    <description> OJMS/AQ </description>
    <property name="datasource"
    value="jdbc/OracleDS">
    </property>
    </resource-provider>
    Orion-ejb-jar.xml is
    <orion-ejb-jar>
    <enterprise-beans>
    <message-driven-deployment name="MessageLogger" destination-location="java:comp/resource/mdbjms/Topics/theTopic" connection-factory-location="java:comp/resource/mdbjms/TopicConnectionFactories/theTopicConnectionFactory">
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    </assembly-descriptor>
    </orion-ejb-jar>
    Any ideas as to what I am doing wrong.
    thanks a lot
    Padmaja

    The problem seems to be that you need to create the TOPIC and TopicConnectionFactory for JNDI.
    The example has the JMS.XML file. You have to copy this file to the oc4j_home/config directory.
    If the file name existed, copy the content of the jms.xml and modify it.
    Remember to restart oc4j when modify any of the config/.. files.
    You should be able to run the sample.
    Good luck.
    Johnny Zhang
    Hi,
    I am trying to deploy the MDB example using OC4J 9.0.3
    and database 9.0.1.
    I am getting an error
    j2ee/home/applications/messagelogger/messagelogger-ejb.jar
    homes: No javax.jms.Destination found at the
    specified destination-location
    (java:comp/resource/mdbjms/Topics/theTopic)
    for MessageDrivenBean MessageLogger
    I did read the message which describes how to set all this up.
    http://forums.oracle.com/forums/message.jsp?id=782562
    application.xml is
    <resource-provider
    class="oracle.jms.OjmsContext" name="mdbjms">
    <description> OJMS/AQ </description>
    <property name="datasource"
    value="jdbc/OracleDS">
    </property>
    </resource-provider>
    Orion-ejb-jar.xml is
    <orion-ejb-jar>
    <enterprise-beans>
    <message-driven-deployment name="MessageLogger" destination-location="java:comp/resource/mdbjms/Topics/theTopic" connection-factory-location="java:comp/resource/mdbjms/TopicConnectionFactories/theTopicConnectionFactory">
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    </assembly-descriptor>
    </orion-ejb-jar>
    Any ideas as to what I am doing wrong.
    thanks a lot
    Padmaja

  • Where are logged unhandled exceptions in wls?

    Hello,
    I have deployed an application in weblogic standalone server, but I don't where I can found logs. Where are logged application's unhandled exceptions?
    I have tested ADFLogger in some java class of the application. But here too, I don't know where I can read these logs, when deployed on standalone weblogic server.

    You can find log file location from WLS Admin Console, for example: http://biemond.blogspot.com/2011/07/change-log-files-location-of-weblogic.html
    Also, if you selected Oracle Enterprise Manager option when WLS domain was extended with ADF libs, then you can browse log files from your browser.
    Dario

Maybe you are looking for