A Question About Message Driven Bean Exception Handling

"Your onMessage method should handle all exceptions. It must not throw checked exceptions, and throwing a RuntimeException is considered a programming error."
The above sentence is from the JMS documentation.
I will use a message driven bean for guarenteeing to send an email with some critical info in case of an unexpected system failure. Say I was not able to save into db some critical info, therefore I want to send that info to myself with a mail to be able to handle that situation manually. Now in case of failure I will send a message to a queue which contains the critical info, and a message driven bean will listen for the message and send email to me. But what if the message driven bean fails ? If I am to handle any exceptions on my onMessage method, how will the messaging system be able to redeliver that message ? It seems to me the message will not remain in the queue anymore(I have consumed it) ?
Any help appreciated, thanks in advance.

Fatih.Karakoc wrote:
"Your onMessage method should handle all exceptions. It must not throw checked exceptions, and throwing a RuntimeException is considered a programming error."
The above sentence is from the JMS documentation.
I will use a message driven bean for guarenteeing to send an email with some critical info in case of an unexpected system failure. Say I was not able to save into db some critical info, therefore I want to send that info to myself with a mail to be able to handle that situation manually. Now in case of failure I will send a message to a queue which contains the critical info, and a message driven bean will listen for the message and send email to me. But what if the message driven bean fails ? If I am to handle any exceptions on my onMessage method, how will the messaging system be able to redeliver that message ? It seems to me the message will not remain in the queue anymore(I have consumed it) ?
You can configure your queue to guarantee delivery. If you use JTA you can also make it transational, so the message is put back on the queue in the event of failure. Your configuration should also include max retries and a failure queue to make sure you don't get stuck in an infinite loop where a message can never be processed.
Which app server are you using? WebLogic makes it pretty easy to set these config parameters.
%

Similar Messages

  • Question about message driven bean

    hello
    i can find tons of tutoriala about developing session bean and entity bean by using jdeveloper,but can't find even one article that tell me how to develop message driven bean and jms by using jdeveloper,who can help me,where can i find such tutorial?
    thank you!

    I setup breakpoints setting thru the MDB examples in j2eesdk 1.4.
    I realize that the message to the being are being process sequentially.
    Is there a way to process message in MDB concurrently?
    Thank you.

  • About message driven bean

    I use ori url to access my ejb runing on another jvm(sun app server).
    like initialcontext.lookup("corbaname:iiop:192.0.0.1:3700#Bean");
    in standalone app.
    How do I call a message driven bean on sun app server in a standalone app which will be deployed in another pc.

    Hi,
    You cannot lookup MDB using JNDI. This is because MDB do not have a home interface and remote interface. Instead when a message producer sends a message to a queue or topic the application server invokes onMessage() method of MDB.
    Please refer to following tutorial for further information.
    http://java.sun.com/developer/technicalArticles/Ecommerce/jms/
    HTH
    VJ

  • Message-driven bean questions

    Hello,
    i'm an Italian student trying to develop java applications in NetBeans IDE 6.1 with GlassFish V2, using Java EE 5; since I only recently approached java web programming, I have encountered some problems in using enterprise beans, especially message-driven ones: to get in touch with the stuff, I have created an enterprise application project in NetBeans with a plain message-driven bean and a servlet who sends a message to this bean, following an online netbeans tutorial.
    I'm using annotations to refer the resource in the servlet (the jms name I assigned the bean is "TestBean"):
    @Resource(mappedName="jms/TestBeanFactory")
    private ConnectionFactory connectionFactory;
    @Resource(mappedName="jms/TestBean")
    private Queue queue;I send the message by creating a connection, producing the message with a MessageProducer object, and sending it:
    Connection connection = connectionFactory.createConnection();
    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer messageProducer = session.createProducer(queue);
    TextMessage message = session.createTextMessage("This is a message.");
    messageProducer.send(message);
    messageProducer.close();
    connection.close();In the message-driven bean, I have my onMessage() method catching the message and writing to the system.out his text content:
    public void onMessage(Message message)
            TextMessage msg = null;
            try
                if (message instanceof TextMessage)
                    msg = (TextMessage) message;
                    String x = msg.getText();
                    System.out.println(x);
            catch (Exception e)
                e.printStackTrace();
                m_ctx.setRollbackOnly();
            catch (Throwable te)
                te.printStackTrace();
        }The message is sent and received, and the content printed. Ok, here are my questions:
    1) in the output window of netbeans I see the output but also an exception: "DirectConsumer:Caught Exception delivering messagecom.sun.messaging.jmq.io.Packet cannot be cast to com.sun.messaging.jms.ra.DirectPacket". What does that mean?
    2) I can't figure out how to make the bean answer this message to the servlet...and of course the servlet receive this response: in plain words, I would like to send back another message from the bean to the servlet, and process it. Can someone explain me how to do that?
    Thanks?

    1) in the output window of netbeans I see the output but also an exception: "DirectConsumer:Caught Exception delivering messagecom.sun.messaging.jmq.io.Packet cannot be cast to com.sun.messaging.jms.ra.DirectPacket". What does that mean?casting issue, but i don't know why.
    2) I can't figure out how to make the bean answer this message to the servlet...and of course the servlet receive this response: in plain words, I would like to send back another message from the bean to the servlet, and process it. Can someone explain me how to do that?a message driven bean cannot sent a response back. MDB is asynchronous. if you need to send a response back, you
    shouldn't be using an MDB. In that case, it sounds like you want a synchronous response. let a SLSB do it.
    %

  • Message Driven Bean and transaction handling

    We are using container managed transactions with MDB's running on OC4J version 10.1.2. We have two database serveres, both running Oracle 10g.
    The MDB consume messages from the AQ-database through JMS (connected to a JDBC datasource registered as "jdbc/OracleAQDS").
    The MDB onMessage() code update the second database, using a JDBC datasource registered as "jdbc/OracleDBDS".
    We need atomic behaviour - if the MDB enforce a roll-back we want the updates aginst the second database to be rolled-back as well.
    (1) Should we use XA-datasources since AQ and DB runs on two different servers or do the OC4J container "magically" provide two-phase-commit for us?
    (2) If the MDB does a roll-back we would like to add an error record to a database table. Can we configure a third datasource and prevent if from beeing part of the container managed MDB roll-back?
    (3) When the MDB force a roll-back, is there some way for us to override the retry-delay in our Java code? If we catch certain errors during processing in onMessage we know that it is not necessary to retry for at least one hour (while less severe errors should be retried in just seconds).

    {color:#008000}Hi Friends,
    Thought of updating the answers for my questions in case somebody else would find it helpful.
    {color}
    {color:#999999}{color:#00ccff}I'm trying to make message driven bean and use the OnListener method.
    But since I'm doing this for the first time I have very limited knowledge.
    The following are my doubts :
    1. Should I have a main function while using the MDB?{color}
    {color:#008000} There is no need for any main function.{color}
    {color:#00ccff}2. Is it mandatory to have JNDI setup done?
    {color} {color}{color:#008000} There is no need for any JNDI setup done. But you need to configure the details on the
    Websphere by creating valid entries inside Resources namely -
    Queue Connection Factory, Queues and Listener Ports under the server.
    Thanks,
    Arun Prithviraj{color}

  • Exception in setting up message-driven bean container: [MQJMS1010: not impl

    Problem
    =======
    We are trying to configure and deploy a Message Driven
    Bean to listen on a WebSphere MQ queue, using LDAP to
    share knowledge of the Queue & Connection Factory.
    But when we start the Sun One domain we get an exception:
    javax.jms.JMSException: MQJMS1010: not implemented
    (see log file at the end of this email)
    Can anybody help please ?
    The configuration of the various components are listed
    below:
    WebSphere MQ Configuration
    ==========================
    Version 5.3
    Queue Manager
    QM_Test
    Queues
    PATH_MFP.Case.Request           
         Queue Type:     Local
    Channels
    Channel_Test               
         Channel Type:     Server Connection
         Protocol Type:     TCP/IP
    LDAP configuration
    ==================
    ldap://localhost/o=mqtest
    cn=MFP_LOCAL_Factory
    javaFactory=com.ibm.mq.jms.MQQueueConnectionFactoryFactory
    javaClassName=com.ibm.mq.jms.MQQueueConnectionFactory
    javaReferenceAddress=#3#QMGR#QM_Test
    javaReferenceAddress=#6#CHAN#Channel_Test
    javaReferenceAddress=#14#TM#SYSTEM.DEFAULT.MODEL.QUEUE
    cn=MFP_LOCAL_Case_Request_Queue
    javaFactory=com.ibm.mq.jms.MQQueueFactory
    javaClassName=com.ibm.mq.jms.MQQueue
    javaReferenceAddress=#9#QU#PATH_MFP.Case.Request
    javaReferenceAddress=#10#QMGR#QM_Test
    EJB configuration
    =================
    ejb-jar.xml
         <message-driven>
    <display-name>ServerMessageDrivenBean</display-name>
    <ejb-name>ServerMessageDrivenBean</ejb-name>
         <ejb-class>nz.co.acc.emi.server.connector.mdb.ServerMessageDrivenBean</ejb-class>
         <transaction-type>Container</transaction-type>
    <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
         </message-driven>
    sun-ejb-jar.xml
    <ejb>
         <ejb-name>ServerMessageDrivenBean</ejb-name>
    <jndi-name>MFP_LOCAL_Case_Request_Queue</jndi-name>
         <mdb-connection-factory>
              <jndi-name>MFP_LOCAL_Factory</jndi-name>
         </mdb-connection-factory>
         </ejb>
    Sun One configuration
    =====================
    MFPProcessing: JNDI: External Resources
    MFP_LOCAL_Factory          Enabled javax.jms.QueueConnectionFactory
         JNDI Name:      MFP_LOCAL_Factory
         Resource Type:     javax.jms.QueueConnectionFactory
         JNDI Lookup:     cn=MFP_LOCAL_Factory
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
              java.naming.security.authentication     none
    MFP_LOCAL_Case_Request_Queue     Enabled javax.jms.Queue
         JNDI Name:      MFP_LOCAL_Case_Request_Queue
         Resource Type:     javax.jms.Queue
         JNDI Lookup:     cn=MFP_LOCAL_Case_Request_Queue
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
    server.xml
    <mdb-container steady-pool-size="10" pool-resize-quantity="2" max-pool-size="60" idle-timeout-in-seconds="600" monitoring-enabled="true" log-level="FINEST" />
    <jms-service port="1240" admin-user-name="admin" admin-password="admin" init-timeout-in-seconds="30" enabled="true" log-level="FINE" />
    Sun One log file
    ================
    server.log
    [01/Mar/2004:10:06:48] INFO ( 657): CORE1116: Sun ONE Application Server 7.0.0_01
    [01/Mar/2004:10:06:51] INFO ( 657): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_01] from [Sun Microsystems Inc.]
    [01/Mar/2004:10:07:09] INFO ( 657): JMS5023: JMS service successfully started. Instance Name = domain1_MFPProcessing, Home = [C:/Sun/AppServer7/imq/bin].
    [01/Mar/2004:10:07:13] INFO ( 657): JTS5014: Recoverable JTS instance, serverId = [100]
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5060: Install JDBC Datasources ...
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5059: Binding [JDBC DataSource Name: jdbc/MfsDataSourceJConn, Pool Name: MFSConnectionPool]
    [01/Mar/2004:10:07:15] INFO ( 657): JMS5015: Install JMS resources ...
    [01/Mar/2004:10:07:47] WARNING ( 657): [EntityContainer] Created EntityContainer....
    [01/Mar/2004:10:07:49] INFO ( 657): LDR5010: All ejb(s) of [mfs] loaded successfully!
    [01/Mar/2004:10:07:52] INFO ( 657): MDB00044: Deploying message-driven bean [emi:ServerMessageDrivenBean], consuming from [MFP_LOCAL_Case_Request_Queue]
    [01/Mar/2004:10:07:52] FINE ( 657): Messages delivery is part of a container-managed tx
    [01/Mar/2004:10:07:52] FINE ( 657): emi:ServerMessageDrivenBean:reconnect-delay-in-seconds=60, reconnect-max-retries=60, reconnect-enabled=true
    [01/Mar/2004:10:07:53] INFO ( 657): MDB00028: [emi:ServerMessageDrivenBean]: Message-driven bean container using external connection factory object: [com.ibm.mq.jms.MQQueueConnectionFactory]
    [01/Mar/2004:10:07:55] FINE ( 657): emi:ServerMessageDrivenBean: Setting message-driven bean pool max-pool-size=60, steady-pool-size=10, pool-resize-quantity=2, idle-timeout-in-seconds=600
    [01/Mar/2004:10:07:55] FINE ( 657): Initializing server session factory
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] INFO ( 657): MDB0001: Create message-driven bean pool with maximum pool size [60], bean idle timeout [600] seconds
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00030: [emi:ServerMessageDrivenBean]: Exception in setting up message-driven bean container: [MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINE ( 657): MDB00018: [emi:ServerMessageDrivenBean]: Closing message-driven bean container connection
    [01/Mar/2004:10:07:55] WARNING ( 657): [AbstractPool]: Cancelled pool timer task at: Mon Mar 01 10:07:55 NZDT 2004
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00017: [ServerMessageDrivenBean]: Exception in creating message-driven bean container: [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): javax.jms.JMSException
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] SEVERE ( 657): EJB5090: Exception in creating EJB container [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] SEVERE ( 657): appId=emi moduleName=emiEjb_jar ejbName=ServerMessageDrivenBean
    [01/Mar/2004:10:07:55] SEVERE ( 657): LDR5004: UnExpected error occured while creating ejb container
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] WARNING ( 657): CORE5021: Application NOT loaded: [emi]
    [01/Mar/2004:10:07:55] INFO ( 657): WEB0100: Loading web module [mfs:mfs.war] in virtual server [MFPProcessing] at [mfs]
    [01/Mar/2004:10:08:31] INFO ( 657): HTTP3072: HTTP listener http-listener-1 [http://ch042dysz0405:1080] ready to accept requests
    [01/Mar/2004:10:08:31] INFO ( 657): CORE3274: successful server startup
    [01/Mar/2004:10:08:33] INFO ( 657): CORE5053: Application onReady complete.

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

  • Exception in setting up message-driven bean container

    hello,
    I'm trying to deploy a single mdb and I'm getting an exception. I've tried closely following the way things are done with the mdb example in the samples AppServer7 directory. Am I missing something in one of my deployment descriptior files?
    Thanks,
    Robert
    [17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00030: [mdb2-simpleEjb:MessageProcessorBean]: Exception in setting up message-driven bean container: [[C4060]: Login failed.]
    [17/Apr/2003:12:18:24] FINE ( 1832): MDB00018: [mdb2-simpleEjb:MessageProcessorBean]: Closing message-driven bean container connection
    [17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00017: [MessageProcessorBean]: Exception in creating message-driven bean container: [javax.jms.JMSSecurityException: [C4060]: Login failed.]
    [17/Apr/2003:12:18:24] SEVERE ( 1832): javax.jms.JMSSecurityException
    javax.jms.JMSSecurityException: [C4060]: Login failed.
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:682)
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:615)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:238)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1512)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

  • Can you set isolation levels of message-driven bean transactions?

    The problem: I have 3 different message-driven beans which each get a different type of message, except for a field that is common to all. That field is used as the primary key of an entity object. The message-driven beans configured to use a container managed transaction. Each message-driven bean, in processing the message, first does a lookup by primary key to see if the object associated with the key exists, and if it does not, it requests the entity's home object to create it. After that, they do further processing. The problem is that sometimes all the beans simultaneously get a message, resulting in each bean checking for the entity object at about the same time, and if they fail to find it (because none of them has created it yet), each creates an object, all with the same primary key. This is not caught until the beans start to complete their onMessage method, which I believe results in the container committing the transaction. One of the transactions will be committed successfully, while the other two will fail, get rolled back, and then be retried with the same message. The second time through, the other beans will find the entity object (since it has been created and committed) and they will complete correctly. In the end, they right thing occurs, except that there is a troubling exception or 2 in the log telling about the constraint violation (with the primary key) and the rollback. If it was just me, that would be fine, but our customer does not like to see exceptions in the log; that indicates to him that something is wrong.
    So, I am looking for someway to make sure that the actions of the message-driven beans are serialized. One suggestion from a colleague was to set the isolation level of the transactions being used by the container in processing the message-driven beans' onMessage method. However, the documentation does not mention any way to do this for a message-driven bean. Suggestions?
    Is the use of a UserTransaction a better way to do this? If I acquire a UserTransaction within the onMessage method of a message-driven bean, can I set its isolation level? How would this work? When I get a UserTransaction, does each client get a different transaction, or do they all get the same one?

    (1) The WebLogic JMS "unit-of-order" feature is a heavily adopted feature that was specifically designed to handle similar use cases - see the JMS developer guide for extensive documentation. In your use case, if "key" is used to define UOO, then there's no limit on the number of keys that can be processed concurrently, but messages for any particular key will be processed single-threaded in the order in which they were first submitted.
    Note that if you're using distributed destinations, the UOO feature is still fully supported - but the developer and/or administrator needs to decide whether to configure the destination to use "hash" or "path service" based routing (the JMS UOO edoc outlines the trade-offs).
    (2) Another alternative is to use a single MDB with max-beans-free-pool that processes all three types (as the other poster suggested). I think this assumes all MDBs run on the same JVM.
    (3) Another alternative is to use multiple queues, with a single MDB on each Q. Where some sort of hash algorithm is used to determine which Q is for the key. This approach is a "hand-coded" variant of the approach in (1) with "hash" based routing enabled...
    (4) If all MDBs actually do run in the same JVM, a third alternative is to use code the application to use a common lock to protect each key, eg, something like:
    // assume MyLock is simply a class with a "reference counter"
    // assume some global "staticHM" hash map that is all MDBs can access
    onMessage() {
    MyLock lock = null;
    key= msg.getKey();
    synchronized(staticHM) {
    lock = staticHM.get();
    if (lock = null) {
    lock = new lock();
    staticHM.put(key, new lock());
    lock.incRefCount();
    try {
    synchronized(lock) {
    // only one onMessage will be able to lock a particular key at a time
    do your work;
    } finally {
    synchronized(staticHT) {
    if (lock.defRefCount() == 0) staticHM.remove(lock);
    if (lock = null) staticHM.put(key);
    If multiple threads get a message with the same key, then only one thread at a time will work on the key.
    Hope this helps,
    Tom

  • Message-Driven Bean using @Resource annotation

    I am trying to run a Message-Driven Bean very simple example in https://glassfish.dev.java.net/javaee5/ejb/examples/MDB.html
    I configured MDBQueueConnectionFactory and MDBQueue properly on glassfish admin console.
    I cannot run the example using @Resource annotation. I don't understand why.
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;But I can run this example modifying the source code using InitialContext instance and looking up for JMS Resources.
    InitialContext ctx = new InitialContext();
    QueueConnectionFactory queueCF=(QueueConnectionFactory)ctx.lookup("MDBQueueConnectionFactory");
    QueueConnection queueCon = queueCF.createQueueConnection();
    Queue mdbQueue=(Queue)ctx.lookup("MDB");
    queueSender.send(mdbQueue, msg);
    ...I want to figure out why @Resource annotation do not work well. Any help?
    Thanks in advanced any help.

    Thanks for your reply.
    The error that I get is a simple NullPointerException. Nothing else.
    Like you said, I develop a servlet and I can use @Resource annotation without static reference, and it works.
    public class TestMDB extends HttpServlet {
         private static final long serialVersionUID = 1L;
         @Resource(mappedName="MDBQueueConnectionFactory")
         private QueueConnectionFactory queueCF;
         @Resource(mappedName="MDB")
         private Queue mdbQueue;
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              PrintWriter out = response.getWriter();
              out.println("TEST MDB "+queueCF);
              QueueConnection queueCon;
              try {
                   queueCon = queueCF.createQueueConnection();
                   QueueSession queueSession = queueCon.createQueueSession
                   (false, Session.AUTO_ACKNOWLEDGE);
                   QueueSender queueSender = queueSession.createSender(null);
                   TextMessage msg = queueSession.createTextMessage("hello");
                   queueSender.send(mdbQueue, msg);
                   out.println("Sent message to MDB");
                   queueCon.close();
              } catch (JMSException e) {
                   e.printStackTrace();
    }But my question were about using @Resource annotation on a standalone client. I always get NullPointerException.
    public class MDBClient {
        @Resource(mappedName="MDBQueueConnectionFactory")
        private static QueueConnectionFactory queueCF;
        @Resource(mappedName="MDB")
        private static Queue mdbQueue;
        public static void main(String args[]) {
         try {
                QueueConnection queueCon = queueCF.createQueueConnection();
                QueueSession queueSession = queueCon.createQueueSession
                    (false, Session.AUTO_ACKNOWLEDGE);
                QueueSender queueSender = queueSession.createSender(null);
                TextMessage msg = queueSession.createTextMessage("hello");
                queueSender.send(mdbQueue, msg);
                System.out.println("Sent message to MDB");
                queueCon.close();
            } catch(Exception e) {
                e.printStackTrace();
    }

  • Message Driven Bean Deployment for a JCA based inbound Connector in SAILFIN

    This post is partly related to my previous post regarding message driven bean deployment issue in SAILFIN b12 application server. I have made another post to put my question to a more specific title with some additions. I am developing a JCA based resource adapter (i.e. connector). The inbound module of the connector listens on a specific port for incoming messages from a server (EIS). The port property and the endpoint interface (custom made message driven bean interface, that is InboundListener) has been specified in the connector's deployment descriptor. When a message reaches, the connector delivers it to the a message driven bean whose code is indicated in the following:
    package com....;
    import com....ra.facade.InboundListener;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDriven;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import java.util.logging.*;
    * Entity class InboundMessageReceiverMDB
    * @author efikayd
    @MessageDriven(
    mappedName = "InboundMessageReceiverMDB",
    messageListenerInterface = com......ra.facade.InboundListener.class,
    activationConfig = {
    @ActivationConfigProperty(
    propertyName = "listenerPort", propertyValue = "12345"),
    @ActivationConfigProperty(
    propertyName="ConnectionFactoryJndiName", propertyValue="RAjms/MyQCF"),
    @ActivationConfigProperty(
    propertyName="DestinationName", propertyValue="MyQueue"),
    @ActivationConfigProperty(
    propertyName="DestinationType", propertyValue="javax.jms.Queue")
    public class InboundMessageReceiverMDB implements InboundListener, MessageListener {
    private static final Logger logger = Logger.getLogger("com.xyz.inbound.InboundMessageReceiverMDB");
    /** Creates a new instance of InboundMessageReceiverMDB */
    public InboundMessageReceiverMDB() {
    public void onMessage(Message message) {
    public void receiveMessage(String message) {
    logger.log(Level.SEVERE, "CLASS: " + getClass().getName() + "METHOD: receiveMessage() ==> Message received...: " + message);
    The listener interface is the following:
    package com...ra.facade;
    public interface InboundListener{
    public void receiveMessage(String message);
    I have set the JMS resource and the queue properties on the admin console of the SAILFIN instance that is locally installed on my Linux machine (Suse 9 - kernel number: 2.6.5-7.244) in the following manner:
    ConnectionFactory:
    JNDI Name: RAjms/MyQCF
    Pool Name: RAjms/MyQCF
    Type: javax.jms.ConnectionFactory
    Status: enabled
    Property1 ==> Name: DestinationType Value: javax.jms.Queue
    Property2 ==> Name: DestinationName Value: MyQueue
    Destination (i.e. queue):
    JNDIName: MyQueue
    Physical Destination Name: MyQueue
    status: enabled
    Property1 ==> Name: DestinationType Value:javax.jms.Queue
    Property2 ==> Name: DestinationName Value:MyQueue
    When I first written this message driven bean, it was not implementing the MessageListener interface. It was only implementing my own InboundListener interface. I did this because JCA specification says that the endpoint (i.e. message driven bean ) is not supposed to make use of JMS and its MessageListener interface. It says it can support custom message listener interface so to say. Then I got the exceptions that are same as the exceptions stated below. So, I made the bean implement the JMS MessageListener interface in addtion to my InboundListener interface assuming that exceptions result from not including the JMS MessageListener interface. Then I generated the necessary JMS resources with configuration settings stated above in the application server. However, I am still getting the same exceptions (see below) and nothing has changed. Do you think the above configuration for the JMS resource is fine and appropriate to the activation configuration specifications in my message driven bean code? Am I missing something on this configuration? Below, I have indicated the message that I got on the linux terminal when I attempt to deploy the message driven bean and the related server log. Thank you very much in advance for your help.
    Kind regards,
    faydemir
    PS: The 'restart' command in the following linux terminal outcome basically makes a call to a bash script which deploys the message driven bean to the SAILFIN application server. The resource adapter instance is already deployed on the application server before attempting to deploy the message driven bean. I am sure that the resource adapter successfully receives the messages from the EIS but it cannot deliver them to the endpoint (i.e.the message driven bean) since the bean is unable to be deployed correctly. I am using Netbeans IDE 5.5.1
    WHILE DEPLOYING:
    ws2089 [11:29am] [home/efikayd/bin] -> ./restart
    Command deploy executed successfully with following warning messages: Error occurred during application loading phase. The application will not run properly. Please fix your application and redeploy.
    WARNING: com.sun.enterprise.deployment.backend.IASDeploymentException: Error while loading EJB module [InboundReceiverMDBModule]. Please refer to the server log for more details.
    ws2089 [11:29am] [home/efikayd/bin] ->
    SERVER LOG:
    [#|2008-01-03T11:29:00.542+0100|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Application server startup complete.|#]
    [#|2008-01-03T11:29:09.482+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;/tmp/s1astempdomain1server-1825660455/InboundReceiverMDBModule.jar;|ADM1006:Uploading the file to:[/tmp/s1astempdomain1server-1825660455/InboundReceiverMDBModule.jar]|#]
    [#|2008-01-03T11:29:12.399+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=18;_ThreadName=Thread-32;|deployed with moduleid = InboundReceiverMDBModule|#]
    [#|2008-01-03T11:29:12.739+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;InboundMessageReceiverMDB;com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|MDB00017: [InboundMessageReceiverMDB]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB]|#]
    [#|2008-01-03T11:29:12.739+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|com.sun.enterprise.connectors.ConnectorRuntimeException
    com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:1528)
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1379)
    at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:170)
    at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
    at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
    at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:537)
    at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:171)
    at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:245)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1004)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:991)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:230)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
    at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:920)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:773)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:470)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
    at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:271)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
    |#]
    [#|2008-01-03T11:29:12.742+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|EJB5090: Exception in creating EJB container [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB]|#]
    [#|2008-01-03T11:29:12.742+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|appId=InboundReceiverMDBModule moduleName=_home_efikayd_SAILFINB12_sailfin_domains_domain1_applications_j2ee-modules_InboundReceiverMDBModule ejbName=InboundMessageReceiverMDB|#]
    [#|2008-01-03T11:29:12.742+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|LDR5004: UnExpected error occured while creating ejb container
    com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:1528)
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1379)
    at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:170)
    at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
    at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
    at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:537)
    at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:171)
    at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:245)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1004)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:991)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:230)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
    at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:920)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:773)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:470)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
    at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:271)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
    |#]
    [#|2008-01-03T11:29:12.745+0100|WARNING|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|CORE5020: Error while loading ejb module|#]
    [#|2008-01-03T11:29:12.747+0100|WARNING|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;Error while loading EJB module [InboundReceiverMDBModule]. Please refer to the server log for more details. ;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|ADM1075:Error on listening event:[Error while loading EJB module [InboundReceiverMDBModule]. Please refer to the server log for more details. ]|#]

    This post is partly related to my previous post regarding message driven bean deployment issue in SAILFIN b12 application server. I have made another post to put my question to a more specific title with some additions. I am developing a JCA based resource adapter (i.e. connector). The inbound module of the connector listens on a specific port for incoming messages from a server (EIS). The port property and the endpoint interface (custom made message driven bean interface, that is InboundListener) has been specified in the connector's deployment descriptor. When a message reaches, the connector delivers it to the a message driven bean whose code is indicated in the following:
    package com....;
    import com....ra.facade.InboundListener;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDriven;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import java.util.logging.*;
    * Entity class InboundMessageReceiverMDB
    * @author efikayd
    @MessageDriven(
    mappedName = "InboundMessageReceiverMDB",
    messageListenerInterface = com......ra.facade.InboundListener.class,
    activationConfig = {
    @ActivationConfigProperty(
    propertyName = "listenerPort", propertyValue = "12345"),
    @ActivationConfigProperty(
    propertyName="ConnectionFactoryJndiName", propertyValue="RAjms/MyQCF"),
    @ActivationConfigProperty(
    propertyName="DestinationName", propertyValue="MyQueue"),
    @ActivationConfigProperty(
    propertyName="DestinationType", propertyValue="javax.jms.Queue")
    public class InboundMessageReceiverMDB implements InboundListener, MessageListener {
    private static final Logger logger = Logger.getLogger("com.xyz.inbound.InboundMessageReceiverMDB");
    /** Creates a new instance of InboundMessageReceiverMDB */
    public InboundMessageReceiverMDB() {
    public void onMessage(Message message) {
    public void receiveMessage(String message) {
    logger.log(Level.SEVERE, "CLASS: " + getClass().getName() + "METHOD: receiveMessage() ==> Message received...: " + message);
    The listener interface is the following:
    package com...ra.facade;
    public interface InboundListener{
    public void receiveMessage(String message);
    I have set the JMS resource and the queue properties on the admin console of the SAILFIN instance that is locally installed on my Linux machine (Suse 9 - kernel number: 2.6.5-7.244) in the following manner:
    ConnectionFactory:
    JNDI Name: RAjms/MyQCF
    Pool Name: RAjms/MyQCF
    Type: javax.jms.ConnectionFactory
    Status: enabled
    Property1 ==> Name: DestinationType Value: javax.jms.Queue
    Property2 ==> Name: DestinationName Value: MyQueue
    Destination (i.e. queue):
    JNDIName: MyQueue
    Physical Destination Name: MyQueue
    status: enabled
    Property1 ==> Name: DestinationType Value:javax.jms.Queue
    Property2 ==> Name: DestinationName Value:MyQueue
    When I first written this message driven bean, it was not implementing the MessageListener interface. It was only implementing my own InboundListener interface. I did this because JCA specification says that the endpoint (i.e. message driven bean ) is not supposed to make use of JMS and its MessageListener interface. It says it can support custom message listener interface so to say. Then I got the exceptions that are same as the exceptions stated below. So, I made the bean implement the JMS MessageListener interface in addtion to my InboundListener interface assuming that exceptions result from not including the JMS MessageListener interface. Then I generated the necessary JMS resources with configuration settings stated above in the application server. However, I am still getting the same exceptions (see below) and nothing has changed. Do you think the above configuration for the JMS resource is fine and appropriate to the activation configuration specifications in my message driven bean code? Am I missing something on this configuration? Below, I have indicated the message that I got on the linux terminal when I attempt to deploy the message driven bean and the related server log. Thank you very much in advance for your help.
    Kind regards,
    faydemir
    PS: The 'restart' command in the following linux terminal outcome basically makes a call to a bash script which deploys the message driven bean to the SAILFIN application server. The resource adapter instance is already deployed on the application server before attempting to deploy the message driven bean. I am sure that the resource adapter successfully receives the messages from the EIS but it cannot deliver them to the endpoint (i.e.the message driven bean) since the bean is unable to be deployed correctly. I am using Netbeans IDE 5.5.1
    WHILE DEPLOYING:
    ws2089 [11:29am] [home/efikayd/bin] -> ./restart
    Command deploy executed successfully with following warning messages: Error occurred during application loading phase. The application will not run properly. Please fix your application and redeploy.
    WARNING: com.sun.enterprise.deployment.backend.IASDeploymentException: Error while loading EJB module [InboundReceiverMDBModule]. Please refer to the server log for more details.
    ws2089 [11:29am] [home/efikayd/bin] ->
    SERVER LOG:
    [#|2008-01-03T11:29:00.542+0100|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Application server startup complete.|#]
    [#|2008-01-03T11:29:09.482+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;/tmp/s1astempdomain1server-1825660455/InboundReceiverMDBModule.jar;|ADM1006:Uploading the file to:[/tmp/s1astempdomain1server-1825660455/InboundReceiverMDBModule.jar]|#]
    [#|2008-01-03T11:29:12.399+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=18;_ThreadName=Thread-32;|deployed with moduleid = InboundReceiverMDBModule|#]
    [#|2008-01-03T11:29:12.739+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;InboundMessageReceiverMDB;com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|MDB00017: [InboundMessageReceiverMDB]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB]|#]
    [#|2008-01-03T11:29:12.739+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|com.sun.enterprise.connectors.ConnectorRuntimeException
    com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:1528)
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1379)
    at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:170)
    at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
    at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
    at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:537)
    at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:171)
    at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:245)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1004)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:991)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:230)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
    at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:920)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:773)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:470)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
    at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:271)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
    |#]
    [#|2008-01-03T11:29:12.742+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|EJB5090: Exception in creating EJB container [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB]|#]
    [#|2008-01-03T11:29:12.742+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|appId=InboundReceiverMDBModule moduleName=_home_efikayd_SAILFINB12_sailfin_domains_domain1_applications_j2ee-modules_InboundReceiverMDBModule ejbName=InboundMessageReceiverMDB|#]
    [#|2008-01-03T11:29:12.742+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|LDR5004: UnExpected error occured while creating ejb container
    com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : InboundMessageReceiverMDB
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:1528)
    at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1379)
    at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:170)
    at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
    at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
    at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:537)
    at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:171)
    at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:245)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188)
    at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1004)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:991)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:230)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
    at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:920)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:773)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:470)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
    at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:271)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
    |#]
    [#|2008-01-03T11:29:12.745+0100|WARNING|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|CORE5020: Error while loading ejb module|#]
    [#|2008-01-03T11:29:12.747+0100|WARNING|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;Error while loading EJB module [InboundReceiverMDBModule]. Please refer to the server log for more details. ;_RequestID=feb08bff-27af-402a-9fd5-b77b8bb5f046;|ADM1075:Error on listening event:[Error while loading EJB module [InboundReceiverMDBModule]. Please refer to the server log for more details. ]|#]

  • Bean exception handling

    Hello,
    I have a question concerning the bean exception handling. If I'd like to use a DB-connection inside a bean, how to handle the SqlException to display a nice error message to the user (perhaps next to the submit-button or redirect to another site).
    Thx
    Stefan

    Thank you for the reply. That works fine but I wanted
    to avoid using Faces-code inside of the bean because
    of portability. Is there a possibility to throw an
    exception inside of a setter and catch it somewhere
    else to generate the FacesMessage there ?There are at least two ways to look at this.
    First, I've found that you often need one or more beans that ties the UI to the backend. For instance, my backend bean may have a method for saving itself to a database, but that method most likely doesn't return a String, as an "action method" must. I also often need a bean to hold UI values that are pure UI artifacts rather than backend values, say a filter criteria for a database search. In this type of bean (I call them "glue beans", others call them "backing bean" or "code behind file") I don't mind having JSF code, so my original suggestion applies to this type of bean rather than to the real backend beans.
    Second, in an application where you can bind the JSF components directly to backend bean properties and methods, you can set up an error handler in the web.xml file that displays a nice error message and logs details about the problem for further analysis.
    Hans Bergsten (EG member)

  • Message-driven beans Vs JMS

    Hi,
    what does the bean technology add to the JSM by using the message driven beans instead of just using the regular asynchronus JMS?

    that's my question when and why should we chose:
    1. simple asynchronous JMS
    2. message-driven beansYou presumably mean:
    1. "simple" JMS client
    2. MDB JMS client
    That'll depend first on your existing architecture.You'll go for the second option if you're already using EJB , as to leverage your existing IT investment.
    Second, the EJB container gives you a number of services, so you don't have to worry about those yourself: life cycle management, scalability, transaction support, concurrency etc..
    With a plain JMS client, you'll have to handle concurrency yourself, for example, by spawning different JMS instances.
    If you're using an EJB container, that container will instantiate multiple MDB instances to handle multiple messages simultaneously.
    OTOH, The EJB contract implies some limitations of use. For example, an MDB can be associated with only one queue or topic. So if you need a JMS client to be able to handle multiple queues ot topics, you'll need to create multiple MDB clients, or go for a simple non-MDB JMS consumer.

  • Message Driven Bean and Distributed transaction

    Hi ALL
    I am developing an asynchronous application using MDB. My application flow is as follows:
    1. From MDB onMessage i am calling a method MethodA that
    a. calls a simple pojo1 where I am getting a Connection on XA enable datasource1 and executing Stored Procedure1 of DatabaseSchema1.
    b. In that pojo without committing m closing the connection and coming back in MethodA.
    c. Again from MethodA m calling a different pojo2 where I am getting a new Connection on XA enable datasource2 and executing Stored Procedure2 of
    DatabaseSchema1. In this pojo also without committing m closing the connection and coming back in MethodA.
    d. Again from MethodA m calling pojo1 where I am getting a new Connection on XA enable datasource1 and executing a different function of Stored Procedure1 of DatabaseSchema1.
    Public class MDB{
    Public void onMessage(��.)
    Try{
    Method1();
    Catch(Exception x)
    mdbcontext.setRollbackOnly();
    Private void MethodA()
    Call pojo1;
    Call pojo2
    Pojo1
    Public void CallSP1()
    Get connection from Datasource1 (shema1,user1, pwd1);
    Call sp1();
    //return without commit;
    Pojo2
    Public void CallSP2()
    Get connection from Datasource2 (shema1,user2, pwd2);
    Call sp2();
    //return without commit;
    SP1:
    Insert table1
    Savepoint 1
    Insert into Table1
    Rollback to 1
    Insert a row
    End SP1 (without commit)
    SP2:
    Insert table2
    Savepoint 2
    Update table2
    Rollback to 2
    Insert table2
    End SP2 (without commit)
    In ejb-jar.xml
    Transaction type is Container
    Transaction attribute is Required for all
    Now problem is:
    Case 1: success case when no exception is there at Java layer
    SP1 works fine I mean there is only 2 inserts in Table 1
    But In SP2 there are 3 inserts
    Case 2: if an exception comes at Java layer
    SP1 is fine
    Rollback is not happening in SP2
    In ejb-jar.xml transaction attributes is Required for all methods and transaction type is Container.
    Backend is Oracle 10g and init.xa has already been run on that.
    Will be very obliged if can have a single hint of the problem.
    Both datasource are XA enable
    Backend is Oracle 10g
    Application server is WAS 6.0
    Queue is WAS MQ 6.0
    Thanks

    {color:#008000}Hi Friends,
    Thought of updating the answers for my questions in case somebody else would find it helpful.
    {color}
    {color:#999999}{color:#00ccff}I'm trying to make message driven bean and use the OnListener method.
    But since I'm doing this for the first time I have very limited knowledge.
    The following are my doubts :
    1. Should I have a main function while using the MDB?{color}
    {color:#008000} There is no need for any main function.{color}
    {color:#00ccff}2. Is it mandatory to have JNDI setup done?
    {color} {color}{color:#008000} There is no need for any JNDI setup done. But you need to configure the details on the
    Websphere by creating valid entries inside Resources namely -
    Queue Connection Factory, Queues and Listener Ports under the server.
    Thanks,
    Arun Prithviraj{color}

  • Message Driven bean: message always removed from queue

    We use MDB to dequeue messages from database queue (AQ) and want to handle errors: if the transaction rolls back, message should have retry_count updated and after defined retries should move to exception queue.
    The problem is, that with all combinations of transactions settings, the message is removed from queue before onMessage is called. If I use Container managed transactions with Mandatory transaction attribute, call to setRollbackOnly fails with message "java.lang.IllegalStateException: Cannot call setRollbackOnly() current thread is NOT associated with a transaction."
    How can I write a MDB, which can commit or rollback message depending on whether exception is or is not thrown? I use JDev 10.1.3.
    Thanks,
    Viliam
    Here are my files:
    ejb-jar.xml:
    <?xml version = '1.0' encoding = 'windows-1250'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
      <enterprise-beans>
        <message-driven>
          <description>Message Driven Bean</description>
          <display-name>SendSMSBean</display-name>
          <ejb-name>SendSMSBean</ejb-name>
          <ejb-class>sk.transacty.cc.ejb.SendSMSBeanBean</ejb-class>
          <transaction-type>Container</transaction-type>
          <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
          <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
          </message-driven-destination>
          <resource-ref>
            <res-ref-name>jdbc/CCDataSource</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
          </resource-ref>
        </message-driven>
      </enterprise-beans>
      <assembly-descriptor>
        <container-transaction>
          <method>
            <ejb-name>SendSMSBean</ejb-name>
            <method-name>*</method-name>
          </method>
          <trans-attribute>Mandatory</trans-attribute>
        </container-transaction>
      </assembly-descriptor>
    </ejb-jar>orion-ejb-jar.xml:
    <?xml version = '1.0' encoding = 'windows-1250'?>
    <!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>
      <enterprise-beans>
        <message-driven-deployment max-instances="1" name="SendSMSBean" connection-factory-location="java:comp/resource/jmsAQ/QueueConnectionFactories/aqQue" destination-location="java:comp/resource/jmsAQ/Queues/msg_queue" listener-threads="1" min-instances="0"/>
      </enterprise-beans>
      <assembly-descriptor>
        <default-method-access>
          <security-role-mapping impliesAll="true" name="<default-ejb-caller-role>"/>
        </default-method-access>
      </assembly-descriptor>
    </orion-ejb-jar>

    As far as I know XMLType JMS messages are not supported when using OJMS. They might be for OC4J 10.1.3, but I thought it's an AQ limitation rather than an OC4J one.. To be sure you might just log a TAR on Metalink.
    hth,
    Bastiaan

  • Message-driven bean problem (re-delivering of JMS msg)

    Sorry for crossposting this (already posted in JMS forum), but perhaps someone here (who doesn't read JMS forum) knows the answer to this problem - it's basically a JMS problem, but closely related to EJB:
    I browsed through all available docs but found no answer to this question: How can I force the re-delivery of a JMS message to happen in a few minutes instead of immediately?
    I use JMS in an EJB container (SonicQ in Borland Enterprise Server 5.0.1) and messages are consumed by a message-driven bean. The problem arises when the bean sets the transaction in which the onMessage() function is called to rollback-only: Then, the message is redelivered immediately again causing an infinte processing loop and 100% CPU load on the machine until the message is finally consumed.
    Is it possible to set a timeout for such a "temporarily rejected" message so that it is retries in a few minutes? Would that be a programming issue, or a configuration issue of the container and/or JMS?

    Hi Chranq,
    What you are talkin about is a container configuration thing as far as I can figure out. I may be that your JMS implementation doesn't support it.
    /Stig

Maybe you are looking for

  • Display problems using mini-dvi to video adapter

    I recently purchased the mini-dvi to video adapter for my powerbook to use my TV as a monitor and to play pictures and videos from the laptop to the TV. I am getting a full color display on the TV, but it's only the screen saver. None of my files, te

  • Low screen brightness on Satellite Pro A200 psae1 with XP

    I installed XP Pro with sp2 on this laptop and now when i power up the screen is really dull, so i have to put it into stand by and then turn on again and then the screen is fine. What could cause such a problem? All drivers are latest release. Pleas

  • Preview crash using text tool

    Hi all! below  the console report anyone has advice? thanks federico Process:     Preview [59586] Path:        /Applications/Preview.app/Contents/MacOS/Preview Identifier:  com.apple.Preview Version:     5.5.3 (719.31) Build Info:  Preview-7190310000

  • PI (XI 7.0) Installation and Post Installation Guides

    We have installed XI 3.0 with previous clients, and we are trying to install XI 7.0 (PI) for a client on Windows 2003 SQL server. We looked for installation documents in the service.sap.com, but we were confused about which documents to follow. Has a

  • Can I download music from my iTouch to iPad2?  If so, How?

    I have a new iPad 2.  However I also have a iTouch that will not restore.  I backed it up one last time right before I tried to restore it.  Now it goes though all the motions, but finally says "Can not Restore".   I would think that my backup is som