Jms desiging part

hi experts.....
i am new to jms scenario
can any one give me the guidence of designing part in integration repository with sceern shots possible?
thank you so much in advance

Hi
Pls check the following Links
/people/sudheer.babu2/blog/2007/01/18/asyncsync-communication-using-jms-adapter-without-bpm-sp-19
/people/venkataramanan.parameswaran/blog/2007/01/18/syncasync-communication-in-jms-adapter-without-bpm-sp19
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
http://help.sap.com/saphelp_nw04/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/content.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5059f110-0d01-0010-7c8b-fdc983be70c0
Regards
Abhijit
Edited by: Abhijit Bolakhe on Sep 12, 2009 1:22 PM

Similar Messages

  • Alerts for JMS Adapter

    Hi All
    I am working on Alert Configuration for Communication channels . I am getting alerts for communication channel  but not alerts for Receiver JMS adapter
    Created alert catergory & classification
    Create alert rule in RWB
    Personlized for sending mail .
    I tried with new rule for only jms adapter .
    I don't want use UDF trigger alerts .
    Please help me on this , thank in advance for your help

    Hi,
    When you getting alerts for other channel means you have to get it for JMS too alert,JMS adapter part of JAVA STACK ,you can maintain alert rule as AE engine failure errors.
    still if it is not working out then
    When are you triggering ALERT??when JMS channel fails to connect MQ??when you expecting ALERT from JMS channel,pls check check the channel status in Communicataion channel monitroing.
    1)Create one more alert rule to specific to your JMS interface,then test it .
    Regards,
    Raj

  • Accessing JMS Queue/Topic located in different Managed server on same domai

    Our use-case is as follows.
    In our weblogic domain we have SOA_Cluster and a stand alone managed server. All the custom JMS resources belong to a JMS server that is targeted to stand alone JMS server. We are trying to access JMS Queues/Topics located in the stand alone managed server from JMS adapter (part of SOA Cluster).
    I am wondering what should be our adapter configuration in this scenario. In going through JMS adapter use-cases (below is the link), there is a mention of how to access resources located in Remote weblogic Domain. I am wondering if the same applies to us OR if there is better way to access JMS resources for our use case.
    http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10231/adptr_jms.htm#CJAHAFGF
    Appreciate your feedback.

    Yes, the same applies for your case but no need to enable trust. Rest of the things will remain same.
    Better you post weblogic related questions in Weblogic forum.
    Regards,
    Anuj

  • Error Generating WebService for SOAP over JMS

    Hi,
    I've been tring to create an addition web service thta takes two input and returns the sum. I was able to generate the WSDL using JDevelopers GUI tool for generating WSDL, but I notices that there was no transport layer, in thebinding that suppoerted SOAP, and the "create web service from WSDL" wizard also gave and error message:
    oracle.jdeveloper.webservices.model.WebServiceException: The chosen WSDL contains no SOAP 1.1 bindings and is therefore unsuitable for generation of a JAX-RPC web service for WLS. Only SOAP 1.1 bindings are supported for generation of JAX-RPC web services for deployment to WLS.
    This is the WSDL I created:
    <?xml version="1.0" encoding="UTF-8" ?>
    <definitions targetNamespace="http://www.example.org/addition"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://www.example.org/addition"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:jms="http://schemas.xmlsoap.org/wsdl/jms/"
    xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/">
    <types>
    <xsd:schema targetNamespace="http://www.example.org/addition/types"
    elementFormDefault="qualified"/>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:add="http://www.example.org/addition"
    targetNamespace="http://www.example.org/addition"
    elementFormDefault="qualified">
    <xsd:element name="additionInput">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="a" type="xsd:int"/>
    <xsd:element name="b" type="xsd:int"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="additionOutput">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="sum" type="xsd:int"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </types>
    <message name="AdditionInputMessage">
    <part name="payload" element="tns:additionInput"/>
    </message>
    <message name="AdditionOutputMessage">
    <part name="payload" element="tns:additionOutput"/>
    </message>
    <portType name="AdditionPortType">
    <operation name="addition">
    <input message="tns:AdditionInputMessage"/>
    <output message="tns:AdditionOutputMessage"/>
    </operation>
    </portType>
    <binding name="AdditionPortTypeJMSBinding" type="tns:AdditionPortType">
    <jms:binding type="ObjectMessage"/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap typeName="tns:additionInput" formatType=""/>
    <format:typeMap typeName="tns:additionOutput" formatType=""/>
    </format:typeMapping>
    <operation name="addition">
    <input>
    <jms:input parts="payload"/>
    <jms:property name="payloadProperty" part="payload"/>
    </input>
    <output>
    <jms:output parts="payload"/>
    <jms:property name="payloadProperty" part="payload"/>
    </output>
    </operation>
    </binding>
    <service name="AdditionPortType">
    <port name="AdditionPortTypePort" binding="tns:AdditionPortTypeJMSBinding"/>
    </service>
    </definitions>
    Could someone please help me out? I've been struggling with this problem for two weeks and can't make any headway. It's really driving me nuts. I've looked all over the web, and while everyone agrees that SOAP over JMS is possible, no one sems to have a working solution. One example I was able to get hold of used ant for deployment, but the deploy task failed when I ran it. Please, please help me.

    Hi,
    I've been tring to create an addition web service thta takes two input and returns the sum. I was able to generate the WSDL using JDevelopers GUI tool for generating WSDL, but I notices that there was no transport layer, in thebinding that suppoerted SOAP, and the "create web service from WSDL" wizard also gave and error message:
    oracle.jdeveloper.webservices.model.WebServiceException: The chosen WSDL contains no SOAP 1.1 bindings and is therefore unsuitable for generation of a JAX-RPC web service for WLS. Only SOAP 1.1 bindings are supported for generation of JAX-RPC web services for deployment to WLS.
    This is the WSDL I created:
    <?xml version="1.0" encoding="UTF-8" ?>
    <definitions targetNamespace="http://www.example.org/addition"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://www.example.org/addition"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:jms="http://schemas.xmlsoap.org/wsdl/jms/"
    xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/">
    <types>
    <xsd:schema targetNamespace="http://www.example.org/addition/types"
    elementFormDefault="qualified"/>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:add="http://www.example.org/addition"
    targetNamespace="http://www.example.org/addition"
    elementFormDefault="qualified">
    <xsd:element name="additionInput">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="a" type="xsd:int"/>
    <xsd:element name="b" type="xsd:int"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="additionOutput">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="sum" type="xsd:int"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </types>
    <message name="AdditionInputMessage">
    <part name="payload" element="tns:additionInput"/>
    </message>
    <message name="AdditionOutputMessage">
    <part name="payload" element="tns:additionOutput"/>
    </message>
    <portType name="AdditionPortType">
    <operation name="addition">
    <input message="tns:AdditionInputMessage"/>
    <output message="tns:AdditionOutputMessage"/>
    </operation>
    </portType>
    <binding name="AdditionPortTypeJMSBinding" type="tns:AdditionPortType">
    <jms:binding type="ObjectMessage"/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap typeName="tns:additionInput" formatType=""/>
    <format:typeMap typeName="tns:additionOutput" formatType=""/>
    </format:typeMapping>
    <operation name="addition">
    <input>
    <jms:input parts="payload"/>
    <jms:property name="payloadProperty" part="payload"/>
    </input>
    <output>
    <jms:output parts="payload"/>
    <jms:property name="payloadProperty" part="payload"/>
    </output>
    </operation>
    </binding>
    <service name="AdditionPortType">
    <port name="AdditionPortTypePort" binding="tns:AdditionPortTypeJMSBinding"/>
    </service>
    </definitions>
    Could someone please help me out? I've been struggling with this problem for two weeks and can't make any headway. It's really driving me nuts. I've looked all over the web, and while everyone agrees that SOAP over JMS is possible, no one sems to have a working solution. One example I was able to get hold of used ant for deployment, but the deploy task failed when I ran it. Please, please help me.

  • WLS managed server startup failure due to JMS Diagnostics Err BEA-320127

    We have started to expereince problems starting a weblogic managed SOA server. The server fails to start with the following JMS related error:
    <Error> <Diagnostics> <BEA-320127> <An error occurred while generating Image Source JMS as part of the diagnostic image zip file:
    java.lang.ClassCastException: weblogic.jms.common.DurableSubscription incompatible with weblogic.jms.backend.BEConsumerCommon
    at weblogic.jms.backend.BackEnd.dump(BackEnd.java:2880)
    at weblogic.jms.JMSService.dump(JMSService.java:1169)
    at weblogic.jms.common.JMSDiagnosticImageSource.createDiagnosticImage(JMSDiagnosticImageSource.java:43)
    at weblogic.diagnostics.image.ImageSourceWork.run(ImageSourceWork.java:111)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    Truncated. see log file for complete stacktrace
    Can anyone help me resolve this issue?
    Thanks.
    Adrian

    Apparently, this issue was found internally and there is no patch for it yet. Please contact Oracle support and request a patch.

  • Accessing JMS Queue located in stand alone managed server on same domain

    Our use-case is as follows.
    In our weblogic domain we have SOA_Cluster and a stand alone managed server. All the custom JMS resources belong to a JMS server that is targeted to stand alone JMS server. We are trying to access JMS Queues/Topics located in the stand alone managed server from JMS adapter (part of SOA Cluster).
    I am wondering what should be our adapter configuration in this scenario. In going through JMS adapter use-cases (below is the link), there is a mention of how to access resources located in Remote weblogic Domain. I am wondering if the same applies to us OR if there is better way to access JMS resources for our use case.
    http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10231/adptr_jms.htm#CJAHAFGF
    Appreciate your feedback.

    Accessing JMS Queue/Topic located in different Managed server on same domai
    Regards,
    Anuj

  • JMS set additional properties

    I am using jms adapter and I would like to set additional jms properties.  I've checked "Set Additional Properties or replace default settings" in my comm channell and I've entered certain key/value combinations.  Unfortunately it does not work.
    Has anyone run into this problem.  Is there a solution.
    We are on SP 16.
    Thanks
    David

    David,
    <b>"additional jms properties"</b>
    do you mean JMS headers specific to your application?
    In that case,check <b>Correlation Settings</b> for the reciever adapter and the
    Set JMSProperty To
    Value the JMS property
    part of it.
    http://help.sap.com/saphelp_nw04/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    Rgds,
    Amol

  • OpenMessageQueue and XA

    I dont understand how OpenMessageQueue could participate in global transaction, when it is quite possible that a commit will fail:
    http://docs.sun.com/app/docs/doc/819-4469/6n6kb5cs3?a=view#gczqs
    It says:
    "In the second case, when the failover occurs during a call to Session.commit, there may be three outcomes:
    1) The transaction is committed successfully and the call to Session.commit does not return an exception. In this case, the application client does not have to do anything.
    2) The runtime throws a TransactionRolledbackException and does not commit the transaction. The transaction is automatically rolled back by the Message Queue runtime. In this case, the client application must retry the transaction as described for the case in which an open transaction is failed-over.
    3) A JMXException is thrown. This signals the fact that the transaction state is unknown: It might have either succeeded or failed. A client application should handle this case by assuming failure, pausing for three seconds, calling Session.rollback, and then retrying the operations. However, since the commit might have succeeded, when retrying the transacted operations, a producer should set application-specific properties on the messages it re-sends to signal that these might be duplicate messages. Likewise, consumers that retry receive operations should not assume that a message that is redelivered is necessarily a duplicate. In other words, to ensure once and only once delivery, both producers and consumers need to do a little extra work to handle this edge case. The code samples presented next illustrate good coding practices for handling this situation."
    If I make the JMS sessions part of a global transaction, how can the OpenMessageQueue / JMS resource guarantee to be part of the ACID property when there is a possible that commit throws an exception ( assuming therefore that the transaction did not complete ), but it actually committed as per above ( 3rd outcome ) ??

    I dont understand how OpenMessageQueue could participate in global transaction, when it is quite possible that a commit will fail:
    http://docs.sun.com/app/docs/doc/819-4469/6n6kb5cs3?a=view#gczqs
    It says:
    "In the second case, when the failover occurs during a call to Session.commit, there may be three outcomes:
    1) The transaction is committed successfully and the call to Session.commit does not return an exception. In this case, the application client does not have to do anything.
    2) The runtime throws a TransactionRolledbackException and does not commit the transaction. The transaction is automatically rolled back by the Message Queue runtime. In this case, the client application must retry the transaction as described for the case in which an open transaction is failed-over.
    3) A JMXException is thrown. This signals the fact that the transaction state is unknown: It might have either succeeded or failed. A client application should handle this case by assuming failure, pausing for three seconds, calling Session.rollback, and then retrying the operations. However, since the commit might have succeeded, when retrying the transacted operations, a producer should set application-specific properties on the messages it re-sends to signal that these might be duplicate messages. Likewise, consumers that retry receive operations should not assume that a message that is redelivered is necessarily a duplicate. In other words, to ensure once and only once delivery, both producers and consumers need to do a little extra work to handle this edge case. The code samples presented next illustrate good coding practices for handling this situation."
    If I make the JMS sessions part of a global transaction, how can the OpenMessageQueue / JMS resource guarantee to be part of the ACID property when there is a possible that commit throws an exception ( assuming therefore that the transaction did not complete ), but it actually committed as per above ( 3rd outcome ) ??

  • Performance advantage to standalone OC4J versus App Server?

    If one uses only the JMS server part of the 10g Application Server, would there be any performance advantage to running the standalone version of the OC4J JMS server versus running the entire application server?

    Are you saying there is zero overhead associated with passing JMS messages through the application server?
    Logic suggests a performance increase when a step is removed...

  • MDB gets cannot find recently created Entity Bean

    I have a session bean that creates several entities beans, and puts a message onto
    JMS queue. A MDB is configured to read the queue, and in onMessage(), it calls
    findByPrimaryKey() for one of the newly created EntityBeans. However, the entity
    bean cannot be found.
    All of the beans in question are using container managed transactions, and all
    have transaction required. The entity bean that I'm looking for is using optimistic
    concurrency. I cannot change it to exclusive without redesigning a major part
    of the system, which have solved a similar problem that I encounted earlier that
    did not involve any message driven beans.
    The only way that I got it to work is put in Thread.sleep(5000) right before calling
    the finder. Does anyone know of any alternatives besides having the MDB sleep?

    No, this will work fine with the existing server. If the publish is
    part of the JTA transaction, then no one can consume the message until
    the original JTA transaction has committed.
    -- Rob
    Rajesh Mirchandani wrote:
    XA defines that a transaction's individual operations will either fail or
    succeed atomically. XA can not, and does not define that a transaction's
    individual operations occur exactly simultaneously.
    The WL transaction monitor does not currently provide a way to serialize a
    transactions commit operations on its component resource managers.
    There is an enhancement filed for this, I guess. Follow up with BEA support.
    Rob Woollen wrote:
    Vina Wang wrote:
    The JMS send is part of the transaction, sort of. The call is within
    the session
    bean transaction, but I'm not using transacted session for
    JMSPulisher. Would
    that fix the problem?Sadly this is a confusing aspect of JMS. You want a non-transacted
    session because you want it to participate in the global transaction
    that the EJB started. Also, make sure that you've enabled user
    transactions on your connection factory.
    There's more info here:
    http://edocs.bea.com/wls/docs70/faq/jms.html#252635
    Let us know if you're still having problems.
    -- Rob
    I know that the transaction hasn't been commited, but I was monitoring
    database
    via SQL call when I tried this. There was about 2 second delay on my
    development
    machine.
    Rob Woollen wrote:
    My guess is the MDB is receiving the message before your "create entity
    bean" transaction has committed. Is the JMS send part of the "create
    entity bean" transaction? It probably should be.
    You can easily prove this by writing a few lines of JDBC to hit the
    database and check for your primary key.
    I would not recommend changing to exclusive or using the Thread.sleep.
    -- Rob
    Vina Wang wrote:
    I have a session bean that creates several entities beans, and putsa
    message onto
    JMS queue. A MDB is configured to read the queue, and in onMessage(),
    it calls
    findByPrimaryKey() for one of the newly created EntityBeans. However,
    the entity
    bean cannot be found.
    All of the beans in question are using container managed transactions,
    and all
    have transaction required. The entity bean that I'm looking for is
    using optimistic
    concurrency. I cannot change it to exclusive without redesigning a
    major part
    of the system, which have solved a similar problem that I encounted
    earlier that
    did not involve any message driven beans.
    The only way that I got it to work is put in Thread.sleep(5000) right
    before calling
    the finder. Does anyone know of any alternatives besides having the
    MDB sleep?
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Help on bsp concept

    hi
    I want to develop a report by using bsp , I done everything ie coding and desiging part but when I executed it is giving internal server error 404.
    regards

    Go the transation sicf and there select sap->bc>bsp>and click on active services
    Regards

  • AQ interfacing with MQ

    I've been given the task of pulling messages off of an MQ queue and updating an Oracle 10g database. I would like to use PL/SQL for the solution. I know there are a couple of PL/SQL packages I can use (DBMS_AQ and DBMS_AQADM) but I'm not clear on how the process will actually work.
    Can I use DBMS_AQ directly against the MQ queue or do I need to set up an AQ queue that talks to the MQ queue and then use DBMS_AQ against the AQ queue?

    There is a component of Advanced Queuing called Oracle Messaging Gateway, see this architecture diagram: http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14257/mg_intro.htm#i1006365 It can be used to propagate messages from MQ to AQ or vice versa. If you propagated meaasges from MQ to AQ, you could then use normal mechanisms to read and process AQ messages.
    If you are willing and able to put Oracle Application Server into the picture, there is the JMS Connector, part of Oracle Enterprise Messaging Service (OEMS). The simplest solution here would be to use a message driven bean (MDB) to read from the MQ queue via the connector, and have JDBC code in the MDB update the database. No AQ needed.

  • Enlisting a JMS session as part of a distributed tx in SFSB

    Consider the following method in a SFSB (Seam 2.1.2, JBoss 4.2 AS, EJB 3.0, JPA 1.0, Hibernate as persistence provider). I am trying to enlist the JMS session as part of the distributed tx and testing this using both local-tx-datasource and xa-datasource (JBoss specific datasources). Apparently the JMS session is not joining the distributed tx because everything is working fine using local-tx-datasource, which it should not. I'm guessing that there are two separate tx's that are happening here instead of one distributed tx. Also, note the following:
    //topicSession = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
    topicSession = conn.createTopicSession(true, TopicSession.AUTO_ACKNOWLEDGE);     The first param in the createTopicSession() method marks it as transacted, which may be used to commit all or none of multiple JMS messages in a tx (e.g. publishing multiple topics to a message queue and guaranteeing atomicity). But I was thinking that would make JTA enlist it in the distributed tx and apparently it does not.
    As per section 13.2.2 of JSR220-core:
    "Behind the scenes, the EJB server enlists the session on the connection to the JMS provider
    and the database connections as part of the transaction. When the transaction commits, the EJB
    server and the messaging and database systems perform a two-phase commit protocol to ensure atomic
    updates across all the three resources."
    Somebody please explain what/how the transactional semantics are in this case when enlisting a db resource mgr and a JMS session resource mgr in a distributed tx (with or w/o Seam).  thx.
    SFSB:
    @Name("startConversation")
    @AutoCreate
    @Install(true)
    @Stateful
    public class TestStartConversation implements TestStartConversationLocal{
    @Logger
    private Log log;
    @In
    private EntityManager em;
    @In
    private EntityManager em2;
    private transient TopicPublisher topicPublisher;  
    private transient TopicSession topicSession;
    private transient TopicConnection conn;
    private transient Topic topic;
    public void startup(){
    log.info("in startup()");
    List<Hotel> list = em.createQuery("from Hotel").getResultList();
    log.info("list.size() = "+list.size());
    Hotel hotel = null;
    if (list != null && list.size() > 0) {
    hotel = list.get(0);
    hotel.setAddress("arbi's house1");
    try{
    InitialContext iniCtx = new InitialContext();
    Object tmp = iniCtx.lookup("ConnectionFactory");
    TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
    conn = tcf.createTopicConnection();
    topic = (Topic) iniCtx.lookup("topic/chatroomTopic");
    //topicSession = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
    topicSession = conn.createTopicSession(true, TopicSession.AUTO_ACKNOWLEDGE);            
    topicPublisher = topicSession.createPublisher(topic);
    topicPublisher.publish( topicSession.createObjectMessage(new ChatroomEvent("connect", "arbime")) );
    topicSession.commit();            
    catch(Exception e){
    //noop
    finally {
    try {
    topicSession.close();
    conn.close();
    catch(Exception e) {
    //noop
    }MDB:
    @MessageDriven(activationConfig={
    @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
    @ActivationConfigProperty(propertyName="destination", propertyValue="topic/chatroomTopic")
    @Name("logger")
    public class LoggerBean implements MessageListener
    @Logger Log log;
    public void onMessage(Message msg)
    try
    ChatroomEvent event = (ChatroomEvent) ( (ObjectMessage) msg ).getObject();
    log.info( "#0: #1", event.getUser(), event.getData()==null ? event.getAction() : event.getData() );
    catch (JMSException jmse)
    throw new RuntimeException(jmse);
    }

    I am using the following code now with the same results. It works w/o enlistment exception which is not what I'm expecting. So apparently there's no distributed tx? How can I check to see if there is a distributed tx and what resources (if any) have been enlisted?
    private transient TopicPublisher topicPublisher;  
         private transient XATopicSession topicSession;
         private transient XATopicConnection conn;
         private transient Topic topic;
         /******************************* begin methods *******************************/
         @TransactionAttribute(TransactionAttributeType.REQUIRED)
         public void startup(){
              log.info("in startup()");
              List<Hotel> list = em.createQuery("from Hotel").getResultList();
              log.info("list.size() = "+list.size());
              try{
                   InitialContext iniCtx = new InitialContext();             
                   XATopicConnectionFactory tcf = (XATopicConnectionFactory) iniCtx.lookup("XAConnectionFactory");
                  conn = tcf.createXATopicConnection();
                  topic = (Topic) iniCtx.lookup("topic/chatroomTopic");
                  topicSession = conn.createXATopicSession();         
                  topicPublisher = topicSession.getTopicSession().createPublisher(topic);
                  topicPublisher.publish( topicSession.createObjectMessage(new ChatroomEvent("connect", "arbime")) );
              catch(Exception e){
                   //noop
              finally {
                   try {
                        topicSession.close();
                        conn.close();
                   catch(Exception e) {
                        //noop
         }

  • My JMS 2 wish list - Part 2, poison messages management

    I attended the JavaOne 2010 session on future JMS evolutions. During the session I described some current limitations or issues I'd like to be solved in a portable way. I've been adviced to share the issues to get feedback from the community. I will post each issue in a dedicated thread.
    Issue 2 - Poison messages management
    Poison messages are messages that are redelivered again and again when an untreated error occurs, possibly resulting in CPU eating long lasting loops.
    This is a well known messaging related issue, but it is not fully adressed by the JMS specification. The Message:getJMSRedelivered method can tell if a message is being redelivered. But this is not good enough and application servers implement their own solutions. Such solutions are based, for example, on redelivery limit and error destinations.
    With WebSphere 6, it is possible to specify, at the SI Bus destination level, an exception destination and a maximum failed deliveries threshold. When messages consumption fails more than the threshold allows, messages are moved to the exception destination.
    JBoss 4 has equivalent features, with a dead letter queue where messages that reached the redelivery limit are moved. It is also possible to use the specific 'JMS_JBOSS_REDELIVERY_DELAY' message property to specify a redelivery delay from the message producer side. JBoss 5 has the same features with the 'dead-letter-address', 'max-delivery-attempts' and 'redelivery-delay' destination configuration parameters.
    WebLogic has equivalent features, see 'Error Destination', 'Redelivery Limit' and 'Redelivery Delay' parameters.
    A portable mechanism should be defined.
    Edited by: 807264 on Nov 3, 2010 6:01 AM

    gimbal2 wrote:
    A portable solution would be useful.You could already do it now by leveraging the Timer functionality that has been part of the EJB spec since JEE 1.4. In stead of sending the message directly, let the timer do it after the delay you specify. That would make it portable with current tech.
    I can't be sure what other implications that might have though, such as in the area of performance and resource usage - I can imagine you wouldn't want to use a timer when you need to send large volumes of messages.In the original requirement, the message is put in the queue immediately by a call to queuesender.send(message) and there's a delivery in delay to a consumer.
    Whereas in this solution, the delay is in the message delivery to the queue itself.
    IMHO there's a subtle but important difference here.What would for example happen if posting the message to the queue is in the scope of a distributed JTA transaction? You can definitely include the timer call to be in the scope of the transaction, but now you will have to account for the fact and there may be an error when the message is delivered which has to be handled explicitly. In the original scenario the tx would automatically rollback.
    cheers,
    ram.

  • My JMS 2 wish list - Part 4, durable subscriptions

    I attended the JavaOne 2010 session on future JMS evolutions. During the session I described some current limitations or issues I'd like to be solved in a portable way. I've been adviced to share the issues to get feedback from the community. I will post each issue in a dedicated thread.
    Issue 4 - How durable are durable topic subscriptions?
    Non durable subscribers receive topic messages only if they are active at the time when the message is received and processed by the JMS engine. Durable subscribers are more complicated, they receive messages if the durable subscription is active when the message is received and processed by the JMS engine.
    How do I know when messages are kept or discarded? Simply put, what is the lifecycle of the subscription?
    When using synchronous receptions or message listeners, the durable subscription lifecycle is managed by the developper using Session:createDurableSubscriber and Session:unsubscribe.
    When using MDB, the durable subscription lifecycle is unspecified and is application server dependant.
    With JBoss 4.2, the subscription lifecyle is the same than the MDB. This means that if the application is redeployed (for example copy the new .ear over the old one in the deploy folder), there is a time frame when the subscription in non existent, so messages are lost.
    WebLogic 10 also seems to associate the subscription lifecycle to the MDB. WebLogic 10 offers a flag, "durable-subscription-deletion", to allow or not the durable subscription deletion when the MDB is undeployed or removed. True means that when the application is redeployed the subscription is deleted and messages are lost. When false is used (it is the default value) the subscription remains even when the MDB is undeployed. I hope this does not mean that if we permanently undeploy the application, the subscription will stay and messages will continue to stack.
    With WebSphere 6 the situation is different. The subscription is not associated to the MDB but to an activation spec that is an administred object. The MDB is merely a client of the activation spec. This way messages are kept as long as the activation spec is active, regardless of application starts/stops/redeploys/etc. Messages are not lost.
    We need a portable way to use durable topics subscriptions.

    gimbal2 wrote:
    A portable solution would be useful.You could already do it now by leveraging the Timer functionality that has been part of the EJB spec since JEE 1.4. In stead of sending the message directly, let the timer do it after the delay you specify. That would make it portable with current tech.
    I can't be sure what other implications that might have though, such as in the area of performance and resource usage - I can imagine you wouldn't want to use a timer when you need to send large volumes of messages.In the original requirement, the message is put in the queue immediately by a call to queuesender.send(message) and there's a delivery in delay to a consumer.
    Whereas in this solution, the delay is in the message delivery to the queue itself.
    IMHO there's a subtle but important difference here.What would for example happen if posting the message to the queue is in the scope of a distributed JTA transaction? You can definitely include the timer call to be in the scope of the transaction, but now you will have to account for the fact and there may be an error when the message is delivered which has to be handled explicitly. In the original scenario the tx would automatically rollback.
    cheers,
    ram.

Maybe you are looking for

  • Material group wise consumption for a particular period

    Hi, How to find out the consumption for a particular material group in a given period along with details of material number, quantity and price. Thanks, Kiran Bodla

  • Classic won't start, can't upgrade, and other problems...

    There's something not quite right with my Mac, and I can't quite pinpoint it. Because of this, I'm not even certain I'm posting this in the right forum! Here's the situation: I have a PowerMac G4, upgraded with a an extra hard drive, an ATI Radeon Pr

  • Os authentication broken in 1.5.3  build 5783

    Hi, I have been happily using SQLDeveloper for quite some time. (Since 2006 on at least 5 different client/customer sites) The latest release has broken the os authentication connection method. ( and this client/customer really prefers them) The erro

  • How to check iphone 3gs is factory unlock

    how to check iphone 3gs is factory unlock

  • Adressbook doesn't respond

    hello!  I'm the owner of a blackberry curve 8520 and lately I have a (kind off) big problem. When I try to add a new contact to my contact list, my phone doesn't respond. Nothing happens, It's like I never even tried to do it. I also tried to add my