Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@www.apache.org Received: (qmail 54579 invoked from network); 2 Apr 2004 17:21:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Apr 2004 17:21:29 -0000 Received: (qmail 18649 invoked by uid 500); 2 Apr 2004 17:21:15 -0000 Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 18608 invoked by uid 500); 2 Apr 2004 17:21:15 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 18593 invoked from network); 2 Apr 2004 17:21:15 -0000 Received: from unknown (HELO public.coredevelopers.net) (209.233.18.245) by daedalus.apache.org with SMTP; 2 Apr 2004 17:21:15 -0000 Received: from [10.101.105.100] (dain [208.42.65.236]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by public.coredevelopers.net (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id 1D2BA3BB58 for ; Fri, 2 Apr 2004 09:12:33 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v613) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <25DC3F4A-84CA-11D8-872B-000393DB559A@coredevelopers.net> Content-Transfer-Encoding: 7bit From: Dain Sundstrom Subject: Re: Problem with DeploymentContext Date: Fri, 2 Apr 2004 11:21:16 -0600 To: geronimo-dev@incubator.apache.org X-Mailer: Apple Mail (2.613) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Just to clarify, this is the code that is using addStreamInclude (in the last if block)... protected XmlObject generateClassPath(URI configID, JarInputStream jarInputStream, DeploymentContext context) throws DeploymentException { URI moduleBase = URI.create(configID.toString() + "/"); XmlObject j2eeDoc = null; try { for (JarEntry entry; (entry = jarInputStream.getNextJarEntry()) != null; jarInputStream.closeEntry()) { String name = entry.getName(); if (name.endsWith("/")) { continue; } if (name.equals("META-INF/ra.xml")) { j2eeDoc = getConnectorDocument(jarInputStream); continue; } if (name.endsWith(".jar")) { URI uri = moduleBase.resolve(name); context.addStreamInclude(uri, jarInputStream); } It looks like the .rar file contains several .jar files, which need to be added to the class path. This is a bit different from an ejb-jar where we want just the outer jar added to the class path, but I actually think this is what we want for ejb-jars. What I plan on doing is to construct a car file that contains just two entries META-INF/config.ser and ejb.jar (at the root level). Any objections? -dain /************************* * Dain Sundstrom * Partner * Core Developers Network *************************/ On Apr 1, 2004, at 6:00 PM, David Jencks wrote: > yes, I had this problem also. I wrote > DeploymentContext.addStreamInclude to deal with it. I'd be happy if > you found a better way, but I didn't. > > david jencks > > On Thursday, April 1, 2004, at 03:07 PM, Dain Sundstrom wrote: > >> Jeremy and David J, >> >> I think I might have run into a structural problem with >> DeploymentContext while writing the EJB deployer. If you take a look >> at EJBConfigBuilder in the openejb cvs, you will see it follows the >> structure of the war deployer. I ran into a problem while attempting >> to write a test for buildConfiguration(File, JarInputStream, >> XmlObject) method. This method starts by coping the file contents >> from the JarInputStream to the output file, and then builds the EJB >> configuration. To build the EJB configuration I need to load and >> inspect the EJB classes, and this is a problem because the output jar >> file doesn't seem to be on the classpath of the DeploymentContext (we >> get the classpath from the context on line 222). >> >> Any idea on how to get around this? >> >> -dain >> >> /************************* >> * Dain Sundstrom >> * Partner >> * Core Developers Network >> *************************/ >> >