You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by random21 <be...@gmail.com> on 2011/12/14 17:53:19 UTC

MDB in Geronimo 3.0-beta-1

Hi Folks,

I've been playing around with with the latest beta release but could
succesfully deploy an MDB, using the the Full JEE 6 profile.

I'm building an EJB jar. My class implements MessageListener interface and
has the @MessageDriven annotation :

I have added the same information from the annotation to ejb-jar.xml. (Which
I think is not necessary ?)

And last but not least, I have added an openejb-jar.xml too. (see below) The
latter has a dependency to the activemq rar which comes with G3.0-beta1.
As for the MDB, the  names the JMS ConnectionFactory to be used.
Again, this factory exists by default in G3-beta1.

When deploying the jar from Eclipse with the Geronimo Adapter I get an error
saying:

Geronimo.log mentions: 

I have tried to add a deployment plan with custom JMS resources and package
everyting as an EAR. No luck either. No luck with the Geronimo samples
either.

Am I missing something too obvious ?

Thanks,
B
openejb-jar.xml:



--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/MDB-in-Geronimo-3-0-beta-1-tp3585999p3585999.html
Sent from the Users mailing list archive at Nabble.com.

Re: MDB in Geronimo 3.0-beta-1

Posted by Shawn Jiang <ge...@gmail.com>.
The default resource adapter name is "ActiveMQ RA" instead of
"DefaultActiveMQConnectionFactory"  in your plan.  Try this:

<name:resource-link>DefaultActiveMQConnectionFactory</name:resource-link>

to

<name:resource-link>ActiveMQ RA</name:resource-link>



On Thu, Dec 15, 2011 at 12:53 AM, random21 <be...@gmail.com> wrote:

> Hi Folks, I've been playing around with with the latest beta release but
> could succesfully deploy an MDB, using the the Full JEE 6 profile. I'm
> building an EJB jar. My class implements MessageListener interface and has
> the @MessageDriven annotation :
>
> @MessageDriven(name = "MessageSinkMDB", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") }, mappedName = "jms/queue/MDBSourceQueue")
>
> I have added the same information from the annotation to ejb-jar.xml.
> (Which I think is not necessary ?) And last but not least, I have added an
> openejb-jar.xml too. (see below) The latter has a dependency to the
> activemq rar which comes with G3.0-beta1. As for the MDB, the ** names
> the JMS ConnectionFactory to be used. Again, this factory exists by default
> in G3-beta1. When deploying the jar from Eclipse with the Geronimo Adapter
> I get an error saying:
>
> No Resource Adapter defined for MDB 'MessageSinkMDB' org.apache.geronimo.common.DeploymentException: No Resource Adapter defined for MDB 'MessageSinkMDB'
>
> Geronimo.log mentions:
>
> [AdminObjectRefBuilder] Failed to build reference to resource env reference [java:comp/BeanManager, java:comp/Validator, java:comp/ValidatorFactory] defined in plan file. The corresponding entry in Geronimo deployment descriptor is missing.
>
> I have tried to add a deployment plan with custom JMS resources and
> package everyting as an EAR. No luck either. No luck with the Geronimo
> samples either. Am I missing something too obvious ? Thanks, B
> openejb-jar.xml:
>
> <ejb:openejb-jar
> 	xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
> 	xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" 	>
> 	<dep:environment>
> 		<dep:moduleId>
> 			<dep:groupId>be.itflex.geronimo</dep:groupId>
> 			<dep:artifactId>ejbApp</dep:artifactId>
> 			<dep:version>1.0</dep:version>
> 			<dep:type>jar</dep:type>
> 		</dep:moduleId>
> 		<dep:dependencies>
> 			<dep:dependency>
> 				<dep:groupId>org.apache.geronimo.configs</dep:groupId>
> 				<dep:artifactId>activemq-ra</dep:artifactId>
> 				<dep:version>3.0-beta-1</dep:version>
> 				<dep:type>car</dep:type>
> 			</dep:dependency>
> 		</dep:dependencies>
> 	</dep:environment>
> 	<ejb:enterprise-beans>
> 		<ejb:session>
> 			<ejb:ejb-name>CountryCapitalBean</ejb:ejb-name>
> 		</ejb:session>
> 		<ejb:message-driven>
> 			<ejb:ejb-name>MessageSingMDB</ejb:ejb-name>
> 			<name:resource-adapter>
> 				<name:resource-link>DefaultActiveMQConnectionFactory</name:resource-link>
> 			</name:resource-adapter>
> 		</ejb:message-driven>
> 	</ejb:enterprise-beans>
> </ejb:openejb-jar>
>
>
>
> ------------------------------
> View this message in context: MDB in Geronimo 3.0-beta-1<http://apache-geronimo.328035.n3.nabble.com/MDB-in-Geronimo-3-0-beta-1-tp3585999p3585999.html>
> Sent from the Users mailing list archive<http://apache-geronimo.328035.n3.nabble.com/Users-f328036.html>at Nabble.com.
>



-- 
Shawn