Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 75989 invoked from network); 14 Jun 2007 03:31:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2007 03:31:04 -0000 Received: (qmail 965 invoked by uid 500); 14 Jun 2007 03:31:04 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 937 invoked by uid 500); 14 Jun 2007 03:31:04 -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 926 invoked by uid 99); 14 Jun 2007 03:31:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2007 20:31:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [69.147.95.83] (HELO smtp120.plus.mail.sp1.yahoo.com) (69.147.95.83) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 13 Jun 2007 20:31:00 -0700 Received: (qmail 28780 invoked from network); 14 Jun 2007 03:30:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=U+CeDKdgFkWFd1Lb9nHwi11UYI/bJFY0IGZs7wtqnBlI9mLN3mvmCW7f0ZtKlXxJcGua6I2efqV1NYdvgwpcr9vLZizzlRbrWEVCRC10W8+lCyYVtBTCQD2cVtqcylvrIxftIJW+Naf5S9/ljnbi3Z7AP5cj7tBiU4AtaiKAAIw= ; Received: from unknown (HELO ?10.11.55.8?) (david_jencks@63.105.20.225 with plain) by smtp120.plus.mail.sp1.yahoo.com with SMTP; 14 Jun 2007 03:30:39 -0000 X-YMail-OSG: Nze_5m4VM1lFMFW_oOBFAo2MJw0Edzn5EzHKzOKg964E3Mw9ImWc9ZfQUO_sw2teqpjOCrf4FT48mSZ504pTPq2_VH3WLpiILmJvs5.6RAUT8QOBTyyP9zCV29eh Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <4670279A.8070802@uky.edu> References: <4670279A.8070802@uky.edu> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: MDB trouble with references Date: Wed, 13 Jun 2007 20:31:25 -0700 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org You need to include the resource plan as a parent of your web-app in the geronimo-web environment element. If this doesn't help please show your entire geroniimo-web.xml. You can eliminate the resource-ref type stuff from your geronimo- web.xml if you make the names exactly the same .... e.g. naming the connection factory "jms/CommonConnectionFactory" There's some support for automatically mapping "common prefixes" but I don't think I got to jms yet :-) hope this helps david jencks On Jun 13, 2007, at 10:21 AM, Viet Hung Nguyen wrote: > I am trying to get a simple MDB to work using annotations. However, > when I deploy it into Geronimo 2.0, I get the following error. This > is with the ConnectionFactory and Queue set up in Geronimo already: > > Error: Unable to distribute order-ear-2.0-SNAPSHOT.ear: Unable to > resolve resource reference 'jms/CommonConnectionFactory' (Could not > auto-map to resource. Try adding a resource-ref mapping to your > Geronimo deployment plan. > > My deployment plan for the ConnectionFactory and Queues looks like > this: > > > > > org.apache.geronimo.samples > jms-resources > 1.2 > rar > > > > org.apache.geronimo.configs > activemq-broker > car > > > > > > CommonConnectionFactory resourceadapter-name> > geronimo config-property-setting> > geronimo config-property-setting> > > DefaultWorkManager > > > > > interface>javax.jms.QueueConnectionFactory interface> > > CommonConnectionFactory > > > > > > > > > > > > > > javax.jms.Queue > org.activemq.message.ActiveMQQueue adminobject-class> > > OrderQueue destination-name> > OrderQueue config-property-setting> > > > ConsignmentQueue destination-name> > name="PhysicalName">ConsignmentQueue > > > > javax.jms.Topic > org.activemq.message.ActiveMQTopic adminobject-class> > > > > I have the MDB with the following annotation > > @MessageDriven(activationConfig = { > @ActivationConfigProperty(propertyName="destinationType", > propertyValue="javax.jms.Queue"), > @ActivationConfigProperty(propertyName="destination", > propertyValue="jms/OrderQueue") > }) > > I have a Servlet with the following annotated Queue and > ConnectionFactory: > > @Resource(mappedName="jms/OrderQueue") > private static Queue receivingQueue; > @Resource(mappedName="jms/CommonConnectionFactory") > private static QueueConnectionFactory factory; > > I have the geronimo-web.xml file which has the following: > > > jms/CommonConnectionFactory > CommonConnectionFactory > > > jms/OrderQueue > OrderQueue > > > However, I think that these references are unnecessary when the > annotations are present. But I am new to EJBs in general so I am > not sure. > > And I also have a web.xml with the following references too > > > jms/CommonConnectionFactory > javax.jms.QueueConnectionFactory > Container > Shareable > > > jms/OrderQueue destination-ref-name> > javax.jms.Queue destination-type> > Produces > OrderQueue > > > Am I missing something? I would appreciate any type of feedback. > > Thanks, > Viet Nguyen