Eugen,

Take a look at the atm example. It uses a jms ejb. You will have to unpack
the ear to get to the bean, but its there. Atm is in the demo directory.

Regards,

the elephantwalker

.ps did you uncomment the jms-config tag in server.xml?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Eugen Bulboaca
Sent: Wednesday, June 27, 2001 9:57 AM
To: Orion-Interest
Subject: HELP on MessageDrivenBeans


Could anybody please describe once and for all ALL the steps required in
deploying an MDB under Orion ?! It's not normal, you write the code in 5
minutes and you styruggle one day or more to do the deployment :(( !

Here's what I have tried - with no success in having the bean to react :

1. Added resource-ref entries in the deployment descriptor ejb-jar.xml

     <enterprise-beans>
          <message-driven>
                <description>Listener message driven bean</description>
                <display-name>Listener</display-name>
                <ejb-name>ListenerBean</ejb-name>

<ejb-class>com.davincitech.mCare.utils.logging.listener.ListenerBean</ejb-cl
ass>
                <message-driven-destination>
                        <destination-type>javax.jms.Topic</destination-type>
                </message-driven-destination>
                <transaction-type>Container</transaction-type>
                <resource-ref>
                                <description>The log topic where log events
are broadcasted...</description>
                                <res-ref-name>jms/theTopic</res-ref-name>
                                <res-type>javax.jms.Topic</res-type>
                                <res-auth>Container</res-auth>
                </resource-ref>
                <resource-ref>
                                <description>The Factory used to produce
connections to the log topic...</description>

<res-ref-name>jms/theTopicConnectionFactory</res-ref-name>

<res-type>javax.jms.TopicConnectionFactory</res-type>
                                <res-auth>Container</res-auth>
                </resource-ref>
         </message-driven>
    </enterprise-beans>

    Orion will automatically add resource-ref-map entries in
orion-ejb-jar.xml:
                <message-driven-deployment
name="com.davincitech.mCare.utils.logging.listener.ListenerBean"
destination-location="jms/theTopic">
                        <resource-ref-mapping name="jms/theTopic" />
                        <resource-ref-mapping
name="jms/theTopicConnectionFactory" />
                </message-driven-deployment>
    Now my question : DO WE NEED TO USE destination-location AND
connection-factory-location ATTRIBUTES FOR message-driven-deployment OR NOT
?!

2.   I tried without those resource-ref entries in ejb-jar.xml and just
setting destination-location and connection-factory-location and no success
either.

Now, I have a client that uses JMS to publish messages to the topic
(actually is a Log4J JMS appender object) - it uses the following parameters
:

<appender name="JMS" class="org.apache.log4j.net.WL_JMSAppender">
           <param name="TopicConnectionFactoryBindingName"
value="java:comp/env/jms/theTopicConnectionFactory"/>
           <param name="TopicBindingName" value="java:comp/env/jms/theTopic"
/>

           <param name="JNDIContextFactory"
value="com.evermind.server.ApplicationClientInitialContextFactory"/>
           <param name="URLContextFactory" value="ormi://localhost/mCare" />
           <param name="User" value="admin" />
           <param name="Passwd" value="admin" />

</appender>

I've tested, it is sending a message to the topic -> I changed Orion's
jmschat example to receive any type o message and it does receive the
messages sent by the client.

Now, what do I need to put in jms.xml ?! I've only added the topic's
declaration:

        <topic name="jms/theTopic" location="jms/theTopic">
                <description>A dummy topic</description>
        </topic>

What am I missing ?!??? I'm tired ! :(((

Thanks !

Eugen




Reply via email to