Xml jms mdb

Hi All,
I am new to xml-jms i have a requirement like this:\
I receive xml messages from SAP XI i need to extract the data for xml and check it using a jms queue (mdb) and pass it to Business Rule Engine server, Is that i need to use parsers to extract data from xml and then pass it to jms queue or i can directly do it directly.
And how to convert the data comming out of mdb to a java object?
Thanks in advance.

Hi Raja,
I assume you mean...
You receive an XML message from a SAP XI system and need to forward it to a business rules engine via JMS.
How do you receive the messages?
What platform is your application running on?
What format is the message in (character encoding etc)?
What format does the business rule engine expect the message to be in?
In general however, JMS messages can be strings, binary data or java objects. Strings are good candidates for XML, but you need to be careful of character encoding. I don't know what character sets SAP use, but if it's not the same a your business rules server expects you'll need to convert it.

Similar Messages

  • JMS - MDB

    Hi everybody,
    I'm new to JMS/MDB and have following problem while deploying MDB under JBOSS:
    22:58:47,735 INFO [EjbModule] Deploying MyPublisher
    22:58:47,745 INFO [EjbModule] Deploying topicMessageBean
    22:58:47,795 WARN [StatelessSessionContainer] message-destination 'PhysicalTopic' has no jndi-name in jboss.xml
    22:58:47,845 INFO [ProxyFactory] Bound EJB Home 'MyPublisher' to jndi 'ejb/MyEj
    bReference'
    22:58:47,865 INFO [EJBDeployer] Deployed: file:/D:/DownLoads/ejb/JBoss/jboss-4.
    0.3/jboss-4.0.3/server/default/deploy/simplemessage.jar
    jboss.xml
    <jboss>
    <enterprise-beans>
    <message-driven>
    <ejb-name>topicMessageBean</ejb-name>
    <destination-jndi-name>topic/MyMDBTopic</destination-jndi-name>
    <mdb-connection-factory>
    <jndi-name>jms/MyTopicConnectionFactory</jndi-name>
    </mdb-connection-factory>
    </message-driven>
    <message-destination>
    <message-destination-name>PhysicalTopic</message-destination-name>
    <jndi-name>topic/MyMDBTopic</jndi-name>
    </message-destination>
    <session>
    <ejb-name>MyPublisher</ejb-name>
    <jndi-name>ejb/MyEjbReference</jndi-name>
    <resource-ref>
    <res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
    <jndi-name>jms/TopicConnectionFactory</jndi-name>
    <default-resource-principal>
    <name>guest</name>
    <password>guest</password>
    </default-resource-principal>
    </resource-ref>
    </session>
    </enterprise-beans>
    </jboss>
    ejb-jar.xml
    <ejb-jar>
    <display-name>MessageJAR</display-name>
    <enterprise-beans>
    <message-driven>
    <display-name>Topic Message Bean</display-name>
    <ejb-name>topicMessageBean</ejb-name>
    <ejb-class>MessageBean</ejb-class>
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <message-selector></message-selector>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <message-destination-link>PhysicalTopic</message-destination-link>
    </message-driven-destination>
    <activation-config>
                        <activation-config-property>
                        <activation-config-property-name>messageSelector</activation-config-property-name>
                        <activation-config-property-value>NewsType = 'Sports' OR NewsType = 'Opinion'</activation-config-property-value>
                        </activation-config-property>
                        <activation-config-property>
                        <activation-config-property-name>subscriptionDurability</activation-config-property-name>
                        <activation-config-property-value>NonDurable</activation-config-property-value>
                        </activation-config-property>
                   </activation-config>
    </message-driven>
    <session>
    <display-name>MyPublisher</display-name>
    <ejb-name>MyPublisher</ejb-name>
    <home>PublisherHome</home>
    <remote>Publisher</remote>
    <ejb-class>PublisherBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
         <res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
              <res-type>javax.jms.TopicConnectionFactory</res-type>
              <res-auth>Container</res-auth>
              <res-sharing-scope>Shareable</res-sharing-scope>
         </resource-ref>
         <message-destination-ref>
         <!--message-destination-ref-name>topic/TopicName</message-destination-ref-name-->
              <message-destination-ref-name>topic/MyMDBTopic</message-destination-ref-name>
              <message-destination-type>javax.jms.Topic</message-destination-type>
              <message-destination-usage>Produces</message-destination-usage>
              <message-destination-link>PhysicalTopic</message-destination-link>
         </message-destination-ref>
         <security-identity>
    <use-caller-identity/>
    </security-identity>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
         <container-transaction>
         <method>
              <ejb-name>topicMessageBean</ejb-name>
              <method-name>onMessage</method-name>
              <method-params>
              <method-param>javax.jms.Message</method-param>
              </method-params>
         </method>
         <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
         <method>
              <ejb-name>MyPublisher</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>publishNews</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <message-destination>
         <message-destination-name>PhysicalTopic</message-destination-name>
         </message-destination>
    </assembly-descriptor>
    </ejb-jar>
    can somebody help???
    Zahid

    Thanks for the reply.
    I'm not getting any errors. The MDB doesn't get invoked when a message is sent on the Topic its listening on.
    The deployment descriptors are given below:
    ejb-jar.xml
    <message-driven>
    <ejb-name>PkgMDB</ejb-name>
    <ejb-class>com.pkg.jms.PkgMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    </message-driven-destination>
    </message-driven>
    orion-ejb-jar.xml
    <message-driven-deployment name="PkgMDB"
    destination-location="jms/PkgTopic"
    connection-factory-location="jms/PkgConFactory">
    <resource-ref-mapping name="jms/PkgTopic" />
    <resource-ref-mapping name="jms/PkgConFactory" />
    </message-driven-deployment>
    jms.xml
    <topic name="jms/PkgTopic" location="jms/PkgTopic">
    </topic>
    <topic-connection-factory name="jms/PkgConFactory" location="jms/PkgConFactory">
    </topic-connection-factory>
    web.xml
    <resource-ref>
    <res-ref-name>jms/PkgTopic</res-ref-name>
    <res-type>javax.jms.Topic</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
    <res-ref-name>jms/PkgConFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    Regards
    Ranga

  • JMS - MDB, jboss deployment problem

    Hi everybody,
    I'm new to JMS/MDB and have following problem while deploying MDB under JBOSS:
    22:58:47,735 INFO [EjbModule] Deploying MyPublisher
    22:58:47,745 INFO [EjbModule] Deploying topicMessageBean
    22:58:47,795 WARN [StatelessSessionContainer] message-destination 'PhysicalTopic' has no jndi-name in jboss.xml
    22:58:47,845 INFO [ProxyFactory] Bound EJB Home 'MyPublisher' to jndi 'ejb/MyEj
    bReference'
    22:58:47,865 INFO [EJBDeployer] Deployed: file:/D:/DownLoads/ejb/JBoss/jboss-4.
    0.3/jboss-4.0.3/server/default/deploy/simplemessage.jar
    jboss.xml
    <jboss>
    <enterprise-beans>
    <message-driven>
    <ejb-name>topicMessageBean</ejb-name>
    <destination-jndi-name>topic/MyMDBTopic</destination-jndi-name>
    <mdb-connection-factory>
    <jndi-name>jms/MyTopicConnectionFactory</jndi-name>
    </mdb-connection-factory>
    </message-driven>
    <message-destination>
    <message-destination-name>PhysicalTopic</message-destination-name>
    <jndi-name>topic/MyMDBTopic</jndi-name>
    </message-destination>
    <session>
    <ejb-name>MyPublisher</ejb-name>
    <jndi-name>ejb/MyEjbReference</jndi-name>
    <resource-ref>
    <res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
    <jndi-name>jms/TopicConnectionFactory</jndi-name>
    <default-resource-principal>
    <name>guest</name>
    <password>guest</password>
    </default-resource-principal>
    </resource-ref>
    </session>
    </enterprise-beans>
    </jboss>
    ejb-jar.xml
    <ejb-jar>
    <display-name>MessageJAR</display-name>
    <enterprise-beans>
    <message-driven>
    <display-name>Topic Message Bean</display-name>
    <ejb-name>topicMessageBean</ejb-name>
    <ejb-class>MessageBean</ejb-class>
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <message-selector></message-selector>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <message-destination-link>PhysicalTopic</message-destination-link>
    </message-driven-destination>
    <activation-config>
    <activation-config-property>
    <activation-config-property-name>messageSelector</activation-config-property-name>
    <activation-config-property-value>NewsType = 'Sports' OR NewsType = 'Opinion'</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>subscriptionDurability</activation-config-property-name>
    <activation-config-property-value>NonDurable</activation-config-property-value>
    </activation-config-property>
    </activation-config>
    </message-driven>
    <session>
    <display-name>MyPublisher</display-name>
    <ejb-name>MyPublisher</ejb-name>
    <home>PublisherHome</home>
    <remote>Publisher</remote>
    <ejb-class>PublisherBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
    <res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <message-destination-ref>
    <!--message-destination-ref-name>topic/TopicName</message-destination-ref-name-->
    <message-destination-ref-name>topic/MyMDBTopic</message-destination-ref-name>
    <message-destination-type>javax.jms.Topic</message-destination-type>
    <message-destination-usage>Produces</message-destination-usage>
    <message-destination-link>PhysicalTopic</message-destination-link>
    </message-destination-ref>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>topicMessageBean</ejb-name>
    <method-name>onMessage</method-name>
    <method-params>
    <method-param>javax.jms.Message</method-param>
    </method-params>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>MyPublisher</ejb-name>
    <method-intf>Remote</method-intf>
    <method-name>publishNews</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <message-destination>
    <message-destination-name>PhysicalTopic</message-destination-name>
    </message-destination>
    </assembly-descriptor>
    </ejb-jar>
    can somebody help???
    Zahid

    Hi,
    if possible, try with "max-bean-in-free-pool=1".
    note: it would be performance impact, as there would be single bean instance.
    Thanks,
    Qumar Hussain

  • Container managed transactions in 9.0.3 (plus AQ JMS/MDB)

    Something for "real programmers", similar to MDB Transaction Exception on OC4J 9.0.4 (MDB Transaction Exception on OC4J 9.0.4) but little bit different. Maybe author of the mentioned thread can find some answers here also.
    We have an MDB accessing AQ in database (this works either with 9i and 8i). MDB receives the message (actually TextMessage), retrieves the content/properties and calls some EJBs making database operations. When we used just the same DataSource for JMS resource provider and SQL operations, everything worked OK. But we need to move one step further - making calls to several databases, some 8i, some might 9i. We were able to start CMT for one DataSource, i. e. configuring OrionCMTDataSource over JDBC ORACLE driver (if you use different DataSource class, message remains stucked in queue and eventually expires. If you don't specify container managed transactions for MDB in ejb-jar.xml, it works with any DataSource class - but message is lost every time exception occurs - not very pleasant situation).
    We are trying to configure DataSources so they provide transactional support while using commit coordinator. There are some documents describing this - in 9iAS Data Sources and JTA, Orion Data Sources and possibly JTA description in 9i database documentation. Both ORACLE documents are very similar. Generally, these are main steps:
    1) configure each data source so they provides CMT support (wrap native driver/data source by OrionCMTDataSource class)
    2) create datasource commit-coordinator database, also using CMT(?)
    3) create user in commit-coordinator database and same in each other database with connect, resource, create session + force any transaction priviledge (since it would commit other users transactions)
    4) create database links from commit-coordinator database to each databases (but... see questions below)
    5) configure commit coordinator so it uses proper data source
    6) add each DB link as a property to data sources
    7) configure data source for JMS
    8) connect JMS resource provider with JMS data source
    9) Start container, send message, etc.
    So far the only result we've got is a trace file in database user dumps and generic "javax.transaction.SystemExeption: Could not commit: error code 29540". User dump occurs in a "remote" database, not the one where commit coordinator resides. If I drop database links, result is the same, so it seems like problem with data source itself. In a dump there is piece of text like this: "FATAL ERROR IN TWO-TASK SERVER: error = 12571" and "ksedmp: internal or fatal error
    Current SQL statement for this session:
    begin dbms_aqin.aq$_dequeue_in( :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29); end; ". I think AQ call is just a coincidence since it is the first one involved in transactions. Down there in HEX part of a dump there is a message about protocol or network error ("probably ORA-28546")
    Here is an example of data source configuration we are using:
    <!-- Passport CMT DataSource -->
    <data-source
    name="PassportDS"
    class="com.evermind.sql.OrionCMTDataSource"
    location="jdbc/PassportDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="int"
    password="int"
    url="jdbc:oracle:thin:@ws18885:1521:ICON"
    inactivity-timeout="30">
    <property name="dblink" value="ICON.WS18885.APPG.COM"/>
    There are some questions pending. Obvious one is if CMT is working or not at all and we should find some different solution (Bean managed transactions or use XA, hmmm). Other one might be that database link has to be "fully-qualified". I'm not sure what it means: using username and password? Using database name along with domain (if any)? So far it seems links are not used anyway.
    We've tried several databases, like 9.2.0.1 and 9.0.3 versions. Result is the same.
    We've tried to use XA data source of ORACLE (oracle.jdbc.xa.client.OracleXADataSource) and OrionCMT data source bound by xa-source-location to it but container gets stucked upon restart with "Investingating resource 'XADataSource PassportXADS' for recovery..." and similar messages for an hour.
    There is an OracleJTADataSource mentioned in several documents, but I cannot find any in jdbc classes - was it deprecated?
    Lies the problem in JMS itself? So far we've been able to use AQ in 8i and 9i and succesfully commit every transaction - provided transaction was local.
    Since XA itself is working I guess problem might be with configuration.
    I will appreciate any opinion on CMT... also, if you have any questions, please ask.
    Myrra

    Hi Per,
    I don't have an answer for you -- sorry {:-( -- only a suggestion (which
    you may have already tried, anyway :-). Have you tried running OC4J
    in "debug" mode? The following web-page gives details on how to do that:
    http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
    Also, if you aren't already aware of them, the following web-sites
    may also be helpful (not in any particular order):
    http://www.orionserver.com
    http://www.orionsupport.com
    http://www.elephantwalker.com
    Good Luck,
    Avi.

  • 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

  • JMS, MDBs, XA and JConsole's 'Threads Started'

    Hi,
    I'm currently looking at perforamce issues of an MDB based application running in SJSAS 8.2. While monitoring the performance of the application we have noticed that the number of threads started (as reported by jconsole) matches the number of messages submitted the the system times the number of MDBs that the message passes through i.e. if we create 20,000 messages and the each processed by 5 MDBs we see the number of threads started rise by 100,000. Each MDB updates a database and passes the message onto another JMS queue in an XA transaction.
    As the number of live threads and peak threads stays pretty constant through out the processing (approx. 150) is this to be expected or is it something that requires more investigation?
    Thanks
    Stephen

    In SJSAS 8.2, the MDB container spawns a new thread to handle each message on the queue. The thread should be short-lived (only as long as it takes to run the onMessage method), but you could certainly see the type of build-up you're describing.
    In SJSAS 9.x, the MDBs are handed by the thread-pool-1 threadpool in your domain.xml, which will be more efficient. So if its possible to upgrade, that would take care of your issue.

  • JMS MDB Clustering destination reconnect problem

    Hey,
              We have got a JMS cluster and we are using MDB:s that listen to a specific
              JMS topic.
              When using MDB:s I have found out, that when the cluster node where my JMS
              server containing the JMS topic is located goes down I get a connection
              problem. The MDB keeps logging following message into weblogic.log:
              The JMS destination with the JNDI name:
              com.nokia.cce.server2.EAIElinkAliveQueue could not be found. Please ensure
              that the
              JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination
              has been deployed.>
              <Apr 3, 2002 10:30:39 AM EEST> <Warning> <EJB> <The Message-Driven EJB:
              ElinkKeepAliveManager2 is unable to connect to the J
              MS destination: com.nokia.cce.server2.EAIElinkAliveQueue. The EJB container
              will automatically attempt to re-establish the c
              onnection with the JMS server. This warning may occur during WebLogic
              Cluster start-up if the JMS destination is located on
              another WebLogic Server instance. When the JMS server connection is
              re-established, the Message-Driven EJB will again receiv
              e JMS messages.
              The Error was:
              The JMS destination with the JNDI name:
              com.nokia.cce.server2.EAIElinkAliveQueue could not be found. Please ensure
              that the
              JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination
              has been deployed.>
              The MDB tries to reconnect to the JMS topic every 10th second and keeps on
              logging this message until the corresponding JMS server comes up again.
              (the example is from a JMS queue, but the same phenomen occurs also for
              topics).
              It is very irritating to keep on getting this message every 10th second to
              the logging file. The logging file becomes full of these messages, which
              takes a lot of file space + makes reading other error messages from the
              weblogic logging very difficult.
              Is there anything todo to avoid this ?
              Can You reconfigure the reconnect interval ?
              It would be enough to get one message, that the connection is lost but
              weblogic will try to reconnect. And then the next message would tell when
              a connection has succeeded again.
              I assume there is no way to specify a primary/secondary
              <destination-jndi-name> in the MDB's deployment descriptor ?
              Is the only way to avoid this, to rewrite the implementation to use custom
              based JMS subscribers instead of using MessageDrivenBean kind of
              implemetation ?
              This is a little bit sad, since MDB's gives such a nice and simple solution
              otherwise...
              Regards
              Jan-Erik
              PS. I'm using weblogic 6.1 and I can not migrate to 7.0 in a near future.
              

    Your comments are noted.
              I believe you can set "JMSPollingIntervalSeconds" in the weblogic descriptor.
              Jan-Erik Aladin wrote:
              > Hey,
              >
              > We have got a JMS cluster and we are using MDB:s that listen to a specific
              > JMS topic.
              > When using MDB:s I have found out, that when the cluster node where my JMS
              > server containing the JMS topic is located goes down I get a connection
              > problem. The MDB keeps logging following message into weblogic.log:
              >
              > The JMS destination with the JNDI name:
              > com.nokia.cce.server2.EAIElinkAliveQueue could not be found. Please ensure
              > that the
              > JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination
              > has been deployed.>
              > <Apr 3, 2002 10:30:39 AM EEST> <Warning> <EJB> <The Message-Driven EJB:
              > ElinkKeepAliveManager2 is unable to connect to the J
              > MS destination: com.nokia.cce.server2.EAIElinkAliveQueue. The EJB container
              > will automatically attempt to re-establish the c
              > onnection with the JMS server. This warning may occur during WebLogic
              > Cluster start-up if the JMS destination is located on
              > another WebLogic Server instance. When the JMS server connection is
              > re-established, the Message-Driven EJB will again receiv
              > e JMS messages.
              > The Error was:
              > The JMS destination with the JNDI name:
              > com.nokia.cce.server2.EAIElinkAliveQueue could not be found. Please ensure
              > that the
              > JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination
              > has been deployed.>
              >
              > The MDB tries to reconnect to the JMS topic every 10th second and keeps on
              > logging this message until the corresponding JMS server comes up again.
              > (the example is from a JMS queue, but the same phenomen occurs also for
              > topics).
              >
              > It is very irritating to keep on getting this message every 10th second to
              > the logging file. The logging file becomes full of these messages, which
              > takes a lot of file space + makes reading other error messages from the
              > weblogic logging very difficult.
              >
              > Is there anything todo to avoid this ?
              > Can You reconfigure the reconnect interval ?
              > It would be enough to get one message, that the connection is lost but
              > weblogic will try to reconnect. And then the next message would tell when
              > a connection has succeeded again.
              > I assume there is no way to specify a primary/secondary
              > <destination-jndi-name> in the MDB's deployment descriptor ?
              >
              > Is the only way to avoid this, to rewrite the implementation to use custom
              > based JMS subscribers instead of using MessageDrivenBean kind of
              > implemetation ?
              > This is a little bit sad, since MDB's gives such a nice and simple solution
              > otherwise...
              >
              > Regards
              > Jan-Erik
              >
              > PS. I'm using weblogic 6.1 and I can not migrate to 7.0 in a near future.
              

  • Jms/MDB/Oracle database

    Hi! This is the first time I use JMS. From a JSP page, I want to send a message to a database in order to make an operation and to have the result of it. I would like to have informations on the steps in order to make that work.
    Thanks!

    Heloo,
    You shod try this:
    Scenario 1
    1. JMS - DB (AQ) must be available;
    2. Create a listener class, that listening the AQ for response;
    3. Create a sender class that send messages to AQ;
    4. Put everything on jsp;
    Scenario 2
    1. JMS - DB (AQ) must be available;
    2. Create a MDB within a J2EE context to solve the listening process. This is the standard implementation (pooled, thread based ... controlled by J2EE container);
    3. Create a sender class that send messages to AQ;
    4. Put everything on jsp;
    You can use JDEV last release to do and test this and Oracle AQ.
    Good luck...

  • JMS MDB manual rollback possible ?

    Hi,
    I want to know if it's possible to manually roll back a message if something goes wrong ?
    I have a Message Driven Bean that receives a message and sends it over http to another component. Now I want to make sure that my message isn't lost. So in case of an http timeout I want the message to be put back on the queue in front of following messages.
    As I read before, a message is removed from its JMS Queue in case the onMessage method of the bean completes, so in my code
    public void onMessage(Message message){
    try{
    //send message over http
    }catch(Exception e){
    //this is where I want the message to be roll-backed
    As it is now, if there is an http timeout, an axception will be catched, but the onmessage method will still be executed successfully, and the message will be removed from the queue, result, a loss of the message.
    is this possible with standard jms ?
    kind regards
    Bert

    It is certainly possible, but it depends on how your application is working.
    if you are working with beans: No problem, just set the MessageDrivenContext.SetRollBackOnly() -> rolls back the transaction! (in case of Container managed transaction), if you are using your own transactions, simply roll them back your self.
    If you are not using beans, you simply do not acknowledge your message, for JMS a message needs to be acknowledged before it assumes that it is delivered. So set your ACK_MODE to CLIENT_ACKNOWLEDGE and in case of an exception do not acknowledge it, otherwise, do acknowledge it.
    Since you are using a MDB the first solution should be used in your case.

  • WebLogic 8.1 JMS/MDB and Trusted Domain

              I have a JMS Topic living in one WebLogic 8.1 domain and a MDB that listens to
              this JMS Topic living in another domain. Do I need to configure trusted domain
              relationship for both domains?
              

              Not sure whether it is just me or not - the new security stuff in WebLogic 8.1
              just makes life so much tougher.
              Thanks for the suggestion anyways.
              Eric
              Tom Barnes <[email protected].bea.com>
              wrote:
              >Even though its meant for foreign providers, perhaps credential
              >mapping would work? See:
              >
              >http://edocs.bea.com/wls/docs81/ejb/message_beans.html#1151409
              >
              >Also, you might want to try posting to the
              >security and/or ejb newsgroups.
              >
              >Tom
              >
              >P.S. This question has come up before, so it seems likely
              >that the security section of the MDB documentation
              >may need more detail. If you post any feedback here,
              >I'll make sure it gets sent directly to the
              >documentation folks...
              >
              >Eric Ma wrote:
              >
              >> I have a JMS Topic living in one WebLogic 8.1 domain and a MDB that
              >listens to
              >> this JMS Topic living in another domain. Do I need to configure trusted
              >domain
              >> relationship for both domains?
              >
              

  • Asynchronous - JMS, MDB design

    Hi,
    I am writing a portion of a J2EE application and would like to perform asynchronous processing. Im new to JMS. Following are some questions i have:
    - How does JMS process message, queue and MDB? I mean when a message is send to a queue, how does it know which MDB should be receiving the message?
    - Im using JBoss which has JMS support. Under normal circumtances, is it all right to use the default queue that comes with the JMSProvider (i.e. the application server in this case)? Or should we write some other codes for create queue?
    - In terms of design, should one MDB only performs a single function? The reason for this is that a MDB seems to only have a single 'onMessage' method?
    Thanks much.
    Veny

    - How does JMS process message, queue and MDB? I mean when a message is send to a queue, how does it know which MDB should be receiving the message?
    Beans are randomly selected from pool, very much similar to 'stateless session bean'.
    - I'm using JBoss which has JMS support. Under normal circumstances, is it all right to use the default queue that comes with the JMSProvider (i.e. the application server in this case)? Or should we write some other codes for create queue?
    You may want to create your own app specific queue(s) unless you are writing 'Hello MDB' application.
    - In terms of design, should one MDB only perform a single function? The reason for this is that a MDB seems to only have a single 'onMessage' method?
    MDBs are never invoked by client directly and can not maintain conversational state for any specific client. When container receives any message it simply calls 'onMessage' on a randomly picked MDB and pass the message. There is no need and use of any other methods - isn't it?
    Cheers,
    Sudhaker Raj
    http://thej2ee.com

  • How to manage parallel processing for queue JMS/MDB?

    Hello, we are developing a system in WebLogic Server 10g (10.3.0) that contains multiple JMS queues associated with each in an MDB. We need know how manage the parallelism of the message for each queue? for example:
    Queue 1: up to 4 messages in parallel
    Queue 2: up to 2 messages in parallel
    Queue 3: up to 5 messages in parallel
    Can also perform this configuration from the WebLogic Server Admin Console?
    Thank you very much,
    Lucas.

    Thanks a lot Tom for the reply, I have read about the descriptor setting 'max-beans-in-free-pool' and I searched this concept at the Administration Console without success.
    I suppose other way is create a “Session Pools” under the JMSServer, and then create a “Consumer” and define the setting “Messages Maximum”. One of the disadvantages is that “Session Pools” don’t support JTA, from the documentation:
    +Session pools enable an application to process messages concurrently. Session pools are now used rarely, as they are not a required part of the J2EE specification, do not support JTA user transactions, and are largely superseded by message-driven beans (MDBs), which are a required part of the J2EE specification.+
    I continue reading the MDB chapter of the performance and tuning guide in the documentation, thanks for any contribution to the topic.
    Lucas.

  • Does J2EE 1.4 RI support non-JMS MDBs?

    I implemented an inbound resource adapter using a custom message listener interface com.mycorp.MyMessageListener.
    I have an MDB implementation class implementing this interface and MessageDrivenBean interface.
    In the deployment descriptor I have
    <messaging-type>
    com.mycorp.MyMessageListener
    </messaging-type>
    When I verify the ejb-jar with Verifier from SDK, I get failure, saying that my MDB implementation class "does not implement the [ javax.jms.MessageListener ] interface".
    Anyone knows if this new feature is supported in RI? Am I missing something?
    Any information would be greatly appreciated.
    Sergey

    According to the release notes
       http://java.sun.com/j2ee/sdk_1.4/beta/techdocs/release/ReleaseNotes.html
    it should support the J2EE Connector 1.5 specification.
    Download the spec
       http://java.sun.com/j2ee/connector/download.html
    and read section 13.3 and 12.7 and 12.8 (A Non-JMS Use Case).
    I think the latter clearly says it is supported by the specification.
    Or do you mean that J2EE RI 1.4 does not follow the specification?
    Hans

  • Some problem with JMS MDB

    In my application i am writing object messages to several queues considering its message id.
    i am using mdb as queue listener.
    i thought to create a sperate mdb for each queue. is this is correct.
    can one mdb can listen several queie.
    from mdb i get the messages and put them to a hash map
    how can i access the hash map from server side
    please help me

    i didn't have internet connection past couple of days.
    in my application i am writing down objects to respective queue considering its id.
    that means depending on the id the object will be written to respective queue.
    then a mdb listens to the queue and write that in to a hash map.
    say there is a queue called workflowq1. this contains events of workflow 1. the event objects will be retrieved and will be freezed till all the evnts gather. then those events will be written in to respective work flow event file.
    i am using the hash map to freeze the work flow events.all the process is done in server side.
    hence the hash map is created in side the mdb. could plese tell me how shall i access the contains of the hash map from other class. i have declared the hash map as a class variable of mdb.
    i want to access the created hash map outside the mdb. how shall i do that.
    please help me
    thanks in advance

  • How to get info from weblogic-ejb-jar.xml? (MDB)

    I'm writing an MDB which is part of a request/reply. In order to reply, I
    need an initial-context-factory and provider-url. Is it possible to get
    this information using the MessageDrivenDescriptorMBean class? I can see
    that MessageDrivenDescriptorMBean has getConnectionFactoryJNDIName() and
    getProviderURL() which should be what I want, but I have no idea how to get
    an instance of MessageDrivenDescriptorMBean. Can I do that in the
    setMessageDrivenContext method of my MDB?
    If not, I can put that information in the env, but I'd rather not do that as
    it is redundant information.
    Thanks.
    Eric

    Forgot... WL6.1.
    "Eric F" <[email protected]> wrote in message
    news:[email protected]..
    I'm writing an MDB which is part of a request/reply. In order to reply, I
    need an initial-context-factory and provider-url. Is it possible to get
    this information using the MessageDrivenDescriptorMBean class? I can see
    that MessageDrivenDescriptorMBean has getConnectionFactoryJNDIName() and
    getProviderURL() which should be what I want, but I have no idea how toget
    an instance of MessageDrivenDescriptorMBean. Can I do that in the
    setMessageDrivenContext method of my MDB?
    If not, I can put that information in the env, but I'd rather not do thatas
    it is redundant information.
    Thanks.
    Eric

Maybe you are looking for

  • Question marks all over site

    I uploaded my site from dreamweaver, but when i try to view it online most of the pages are covered in small question marks in blue boxes. I presume this means there is something going wrong with my images. Could anyone give me some help on this on h

  • Email account setup failure

    AT&T 8310 Curve - I have one e-mail address set up and working fine: IMAP Trying to set up a slightly more complex one fails. The differences with the second account are: It uses SSL. The mail server is NOT the same as the domainaname in the e-mail a

  • Screen dump error

    Hi experts In our development system - T-code:CA03 after entering when we clicking header icon dump error is coming. All other icons are working fine. Our ABAPer also checked screen 1200 is active. what can be the other possible reasons.? Regards, sr

  • Test Note (Documentation Type) when creating Test Plan

    Hi Gurus. After we upgraded our SolMan 7.0 system from Support Pack (ST component ) level 19 to level 25,  I noticed this new field "Test Note" (Dcoumentation Type) when creating a Test Plan in transaction STWB_2. Initially, when I haven't chosen any

  • Improving queue performance

    In the current iteration of our AQ implementation, we allow Oracle to do a full table scan each time it processed a record. We are considering dropping the statistics on the queue tables so that oracle will use the index. Could those reading provide