Return-Path: X-Original-To: apmail-geronimo-user-archive@www.apache.org Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2C2849D75 for ; Thu, 15 Dec 2011 02:13:03 +0000 (UTC) Received: (qmail 7061 invoked by uid 500); 15 Dec 2011 02:13:02 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 7026 invoked by uid 500); 15 Dec 2011 02:13:02 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 7019 invoked by uid 99); 15 Dec 2011 02:13:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2011 02:13:02 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of genspring@gmail.com designates 74.125.83.54 as permitted sender) Received: from [74.125.83.54] (HELO mail-ee0-f54.google.com) (74.125.83.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2011 02:12:55 +0000 Received: by eekc50 with SMTP id c50so1821808eek.13 for ; Wed, 14 Dec 2011 18:12:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JYkcrOxq6EVhT7kXdbxPDGJWfQ3vurpyGjaEnbuWIYM=; b=lnfbi6r1htfJnveoj7W0pAJ9wh77AXbdfom9U2zs5zsXO6LmpOi07ICfujfzm4iFlk j5rVW1WgjAH6nBzxuPI2lTEEu6KKWwvC3i1K/FpLg4SgS2SmQ/vSi9oAD/8iw7LrZwc3 sNevaEoRZOBrKHXZiFohzxszOUmww1D4qvnnw= MIME-Version: 1.0 Received: by 10.14.100.201 with SMTP id z49mr474417eef.45.1323915153960; Wed, 14 Dec 2011 18:12:33 -0800 (PST) Received: by 10.213.31.143 with HTTP; Wed, 14 Dec 2011 18:12:33 -0800 (PST) In-Reply-To: <1323881599098-3585999.post@n3.nabble.com> References: <1323881599098-3585999.post@n3.nabble.com> Date: Thu, 15 Dec 2011 10:12:33 +0800 Message-ID: Subject: Re: MDB in Geronimo 3.0-beta-1 From: Shawn Jiang To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=bcaec521550176f0b304b4180497 --bcaec521550176f0b304b4180497 Content-Type: text/plain; charset=ISO-8859-1 The default resource adapter name is "ActiveMQ RA" instead of "DefaultActiveMQConnectionFactory" in your plan. Try this: DefaultActiveMQConnectionFactory to ActiveMQ RA On Thu, Dec 15, 2011 at 12:53 AM, random21 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: > > 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" > > > > be.itflex.geronimo > ejbApp > 1.0 > jar > > > > org.apache.geronimo.configs > activemq-ra > 3.0-beta-1 > car > > > > > > CountryCapitalBean > > > MessageSingMDB > > DefaultActiveMQConnectionFactory > > > > > > > > ------------------------------ > View this message in context: MDB in Geronimo 3.0-beta-1 > Sent from the Users mailing list archiveat Nabble.com. > -- Shawn --bcaec521550176f0b304b4180497 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The default resource adapter name is "ActiveMQ RA" instead of &qu= ot;DefaultActiveMQConnectionFactory"=A0 in your plan.=A0 Try this:
=
<name:resource-link>DefaultActiveMQConnectionFactory</nam=
e:resource-link>

to

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


On Thu, Dec 15, 2011 at 12= :53 AM, random21 <benoni29@gmail.com> wrote:
Hi Folks, I've been playing around with with the latest beta release but could su= ccesfully 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 =3D "MessageSinkMDB", activationConfig =
=3D { @ActivationConfigProperty(propertyName =3D "destinationType"=
;, propertyValue =3D "javax.jms.Queue") }, mappedName =3D "j=
ms/queue/MDBSourceQueue")
I have added the same information from the annotation to ejb-jar.xml. (Whic= h I think is not necessary ?) And last but not least, I have added an openejb-jar.xml too. (see below) Th= e 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 erro= r saying:
No Resource Adapter defined for MDB 'MessageSinkMDB' org.apach=
e.geronimo.common.DeploymentException: No Resource Adapter defined for MDB =
'MessageSinkMDB'
Geronimo.log mentions:
[AdminObjectRefBuilder] Failed to build referen=
ce to resource env reference [java:comp/BeanManager, java:comp/Validator, j=
ava: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 eit= her. Am I missing something too obvious ? Thanks, B openejb-jar.xml:
<ejb:openejb-jar
	xmlns:dep=3D"http://geronimo.apache.org/xml/ns/deployment-1.2=
" xmlns:ejb=3D"http://openejb.apache.org/xml/ns/openejb-jar-2=
.2"
	xmlns:name=3D"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:res=
ource-link>
			</name:resource-adapter>
		</ejb:message-driven>
	</ejb:enterprise-beans>
</ejb:openejb-jar>

=09

View this message in context: MDB in Geronimo 3.0-beta-1
Sent from the Users mailing list archive at Nabble.co= m.



--
Shawn
--bcaec521550176f0b304b4180497--