You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ilango_g <il...@yahoo.com> on 2008/10/17 04:05:26 UTC

MDB sample available?

Hi
I have embedded ActiveMQ with JBoss according to instructions provided. 
Now I want to create a Message-Driven Bean (MDB) that will be listening on
an ActiveMQ queue. This Listener will receive the message and process it. I
would also need a servlets that will communicate with the MDB. 
I have a couple of servlets right now. I only need to know how to create an
MDB in ActiveMQ and how to have my servlets talking to the MDB.

thanks
-- 
View this message in context: http://www.nabble.com/MDB-sample-available--tp20025931p20025931.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Do you think it will work for JBoss 5

Posted by Hans Bausewein <ha...@comerwell.xs4all.nl>.

ilango_g wrote:
> 
> Do you think this integration will work on JBoss 5?
> 

It should.

But I had some problems on (5.0 CR2)  when I tried it recently.

2008-10-07 11:48:59,871 DEBUG [org.jboss.ejb.MessageDrivenContainer] (main)
Initialization failed
jboss.j2ee:jndiName=local/TextNextMDB@21230365,service=EJB
java.lang.UnsupportedOperationException: Message driven beans are not bound
into remote jndi

Must be missing something. I did not have time to fix it.

It works on 4.0.5 and 4.2.3

Hans

-- 
View this message in context: http://www.nabble.com/MDB-sample-available--tp20025931p20139729.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Do you think it will work for JBoss 5

Posted by ilango_g <il...@yahoo.com>.
Do you think this integration will work on JBoss 5?
thanks



Hans Bausewein wrote:
> 
> 
> ilango_g wrote:
>> 
>> ...
>> I think the two remaining steps are to to do the following: (This is from
>> "http://activemq.apache.org/jboss-integration.html"
>> ...
>> 
> 
> looks like the way to go.
> 
> for me it worked (I think)
> 
> Hans
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/MDB-sample-available--tp20025931p20138101.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: MDB sample available?

Posted by Hans Bausewein <ha...@comerwell.xs4all.nl>.

ilango_g wrote:
> 
> ...
> I think the two remaining steps are to to do the following: (This is from
> "http://activemq.apache.org/jboss-integration.html"
> ...
> 

looks like the way to go.

for me it worked (I think)

Hans



-- 
View this message in context: http://www.nabble.com/MDB-sample-available--tp20025931p20076397.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: MDB sample available?

Posted by ilango_g <il...@yahoo.com>.
Thanks for your reply. I have an embedded ActiveMQ broker running in Jboss. 
Your last sentence: "You also have to configure and deploy the ActiveMQ
resource adapter and link the JBoss MDB invoker to it. "
I did not fully understand this, but I did deply the the ActiveMQ resource
adapter (activemq-ra-$version.rar) into the JBoss deployment directory. 
I think the two remaining steps are to to do the following: (This is from
"http://activemq.apache.org/jboss-integration.html"
1) # panacya-jms-ds.xml — This is a JBoss data source file. It contains
configuration information that JBoss uses to create connector specific
objects used for outbound communication. These objects are then made
available through JNDI. (JBoss uses this same mechanism for configuring JDBC
data sources.) This file contains specific entries that tie it to the
activemq-ra-1.2.rar file, so it has a deployment time dependency on that
file.
# panacya-mdb-test-1.0.jar — This is a standard EJB archive deployed as a
standalone module. It contains the standard ejb-jar.xml deployment
descriptor plus an additional JBoss specific deployment descriptor. The
JBoss specific file is named jboss.xml and is located in the /META-INF
directory. The jboss.xml file contains all of the configuration information
needed by JBoss to connect both the inbound and the outbound flows to
ActiveMQ. It contains information that ties the ejb-jar.xml file it to both
the panacya-jms-ds.xml file and the activemq-ra-1.2.rar file, so it has a
deployment time dependency on both of those files.

I hope I am in the right direction. 


Hans Bausewein wrote:
> 
> 
> ilango_g wrote:
>> 
>> I have a couple of servlets right now. I only need to know how to create
>> an MDB in ActiveMQ and how to have my servlets talking to the MDB.
>> 
> 
> JBoss has some MDB examples. You have to modify the deployment
> descriptor(s) to use ActiveMQ instead of JBoss MQ. (the standard JBoss JMS
> provider)
> 
> If you do not like to have the ActiveMQ specific  <activation-config>  in
> ejb-jar.xml you can also specify it in jboss.xml immediately after
> <ejb-name>.
> 
> You also have to configure and deploy the ActiveMQ resource adapter and
> link the JBoss MDB invoker to it.
> 
> See
>   http://activemq.apache.org/inbound-communication.html
> 
> 
> The servlet
> 
> If your servlet is running in JBoss, it's just a JMS client in a J2EE
> environment. 
> See http://activemq.apache.org/outbound-communication.html
> 
> Hans
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/MDB-sample-available--tp20025931p20056723.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: MDB sample available?

Posted by Hans Bausewein <ha...@comerwell.xs4all.nl>.

ilango_g wrote:
> 
> I have a couple of servlets right now. I only need to know how to create
> an MDB in ActiveMQ and how to have my servlets talking to the MDB.
> 

JBoss has some MDB examples. You have to modify the deployment descriptor(s)
to use ActiveMQ instead of JBoss MQ. (the standard JBoss JMS provider)

If you do not like to have the ActiveMQ specific  <activation-config>  in
ejb-jar.xml you can also specify it in jboss.xml immediately after
<ejb-name>.

You also have to configure and deploy the ActiveMQ resource adapter and link
the JBoss MDB invoker to it.

See
  http://activemq.apache.org/inbound-communication.html


The servlet

If your servlet is running in JBoss, it's just a JMS client in a J2EE
environment. 
See http://activemq.apache.org/outbound-communication.html

Hans


-- 
View this message in context: http://www.nabble.com/MDB-sample-available--tp20025931p20028302.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.