Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 5975 invoked from network); 22 Feb 2007 23:27:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2007 23:27:47 -0000 Received: (qmail 37593 invoked by uid 500); 22 Feb 2007 23:27:53 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 37584 invoked by uid 500); 22 Feb 2007 23:27:53 -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 37573 invoked by uid 99); 22 Feb 2007 23:27:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2007 15:27:53 -0800 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 [206.190.53.29] (HELO smtp104.plus.mail.re2.yahoo.com) (206.190.53.29) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 22 Feb 2007 15:27:41 -0800 Received: (qmail 20404 invoked from network); 22 Feb 2007 23:27:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=ZkQyo4DT9dNZgksHOaKccyecOY94FaExOsNjzbWKXtUcHqjSZbpJWVrvUIi12mEklPUMRyBQxy65BIpDTMwZX0hye5fEQreeJKHcpb+SLRvWVMciWYL7FfZCYUQt9lnnAOxuncfS0saiDlGfNMttbMxfGv3y5sq9uIulJYOa9kI= ; Received: from unknown (HELO ?10.11.55.8?) (david_jencks@63.105.20.225 with plain) by smtp104.plus.mail.re2.yahoo.com with SMTP; 22 Feb 2007 23:27:19 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <45DE23B1.9050003@vacode.com> References: <45DD6660.9060306@vacode.com> <45DE23B1.9050003@vacode.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1BDB05AA-3A0E-4BBA-A514-AA4E95135C61@yahoo.com> Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: Is there a vendor independent way of accessing EJBs from a standalone client? Date: Thu, 22 Feb 2007 15:27:17 -0800 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org On Feb 22, 2007, at 3:13 PM, Ryan wrote: > You're right, I didn't quite explain things 100%. I would like to > have > a .ear file that contains EJBs and a Swing client. I would like to be > able to deploy that .ear and have it work on Glassfish or Geronimo, > but > don't want to change naming lookups, etc. > > I really just want to have the option of switching vendors at a later > date. I will always use a matching app server and client container > (ie: > Geronimos AS with Geronimo ACC, or Glassfish AS with Glassfish ACC). In that case you should be able to just use ejb-link or the equivalent annotation and have it just work on any compliant app server. This works fine for j2ee 1.4 stuff in geronimo 1.x, I don't think its all working in 2.0 yet. I'm sure it all works in glassfish as well. If you are using jndi rather than injection you'll be looking up stuff in java:comp/env/.... thanks david jencks > > Ryan > > > Jencks wrote: >> I'm unclear on whether you plan to run the app client on the same >> vendors product as the ejb itself. >> >> If you plan to use 2 vendors you have to use corba. >> >> If you plan to use the app client container and the ejb container >> from >> geronimo, what you are trying should work. However for geronimo you >> would have to have deployed the ejb application first (assuming it is >> not packaged in an ear with the app client) and the ejb app would >> have >> to be a parent of the client app. Under these circumstances the >> deployers should be able to find your ejb at deploy time and >> figure out >> how to hook up to it when you run the app client. >> >> thanks >> david jencks >> >> On Feb 22, 2007, at 1:46 AM, Ryan wrote: >> >>> Hi, >>> >>> I'm working at setting up an application client and am having some >>> difficulty accessing EJBs on the server. I'm running my client >>> using an >>> application client container and am trying it out on a few different >>> application servers. >>> >>> However, I'm having difficulty finding a way to lookup EJBs in a >>> vendor >>> independent manner. Specifically, almost every doc I can find >>> has some >>> variation of: >>> >>> Context initialContext = new InitialContext(); >>> Object ref = initialContext.lookup("some vendor specific name >>> here"); >>> >>> If I replace "some vendor specific name here" with the proper vendor >>> specific name for each app server and re-deploy everything works. >>> >>> At first I thought I could use application-client.xml to name >>> each EJB >>> and have the container(s) take care of the mapping, but I haven't >>> had >>> any luck with this approach. I tried something like this (relevant >>> parts only): >>> >>> >>> ejb/test1234/ConnectionTester >>> Session >>> domain.ejb.interfaces.ConnectionTesterRemote >>> >>> >>> When I deploy to Glassfish using the above I end up with a JNDI >>> name of >>> "ejb/test1234/ConnectionTester" and can look it up using >>> "java:comp/env/ejb/test1234/ConnectionTester". >>> >>> However, when I try to deploy to Geronimo, I get the following error >>> (while deploying): >>> >>> org.apache.openejb.OpenEJBException: Cannot find bean >>> "ejb/test1234/ConnectionTester" referenced by bean "GeronimoEnc". >>> >>> Obviously I'm missing something because Glassfish appears to use >>> 'ejb-ref-name' as a type of alias for the EJB name while Geronimo >>> thinks >>> it contains the name of an existing EJB. >>> >>> Maybe I'm just not thinking clearly tonight, but isn't there some >>> kind >>> of simple, standard way of looking up an EJB from a standalone >>> client? >>> Is vendor independence even a realistic goal (that's what the >>> spec is >>> for right)? >>> >>> Thanks in advance for any help, >>> Ryan >>> >>> P.S. Sorry for the formatting :-( >>> >> >