geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Re: How to package the standalone ejb file ?
Date Tue, 28 Sep 2010 13:31:23 GMT
 Hmm, seems that it should be OK if the ejb jar is used directly, it looks
like more nature. One disadvantage is that we need to extract the jar and
repackage it, but I think that it should not an issue. I will try it.
Thanks.


2010/9/28 David Jencks <david_jencks@yahoo.com>

>
> On Sep 28, 2010, at 12:16 AM, Ivan wrote:
>
> > Hi,
> >     In the past, while deploying a standalone ejb module, we renamed it
> with ejb.jar and packaged in in the car package, and we use the same way now
> in OSGI, which means ejb.jar is added to the bundle-classpath.
> > This causes some failures, while scanning the annotations, it uses the
> codes below, while the zipFileDiscroveryRequired is called, the parameter s
> is ejb.jar, which leads to all the classes are ignored. I am wondering why
> we wrapper the initial ejb jar file, why not directly use it ?
>
> We'll have to add stuff to it (currently the serialized gbean state) but I
> think that would be fine.
>
> thanks
> david jencks
>
> >     --->
> >    final String location = module.getModuleId();
> >             boolean useLocation = location != null
> >                     && !location.isEmpty()
> >                     && !module.getJarLocation().endsWith(".war");
> >             if (useLocation) {
> >                 ResourceDiscoveryFilter filter = new
> ResourceDiscoveryFilter() {
> >
> >                     @Override
> >                     public boolean rangeDiscoveryRequired(DiscoveryRange
> discoveryRange) {
> >                         return discoveryRange ==
> DiscoveryRange.BUNDLE_CLASSPATH || discoveryRange ==
> DiscoveryRange.FRAGMENT_BUNDLES;
> >                     }
> >
> >                     @Override
> >                     public boolean zipFileDiscoveryRequired(String s) {
> >                         return s.equals(location);
> >                     }
> >
> >                     @Override
> >                     public boolean directoryDiscoveryRequired(String s) {
> >                         return s.equals(location);
> >                     }
> >                 };
> >
> >                 return new BundleAnnotationFinder(packageAdmin, bundle,
> filter);
> >             } else {
> >                 ResourceDiscoveryFilter filter = new
> ResourceDiscoveryFilter() {
> >
> >                     @Override
> >                     public boolean rangeDiscoveryRequired(DiscoveryRange
> discoveryRange) {
> >                         return discoveryRange ==
> DiscoveryRange.BUNDLE_CLASSPATH || discoveryRange ==
> DiscoveryRange.FRAGMENT_BUNDLES;
> >                     }
> >
> >                     @Override
> >                     public boolean zipFileDiscoveryRequired(String s) {
> >                         return true;
> >                     }
> >
> >                     @Override
> >                     public boolean directoryDiscoveryRequired(String s) {
> >                         return true;
> >                     }
> >                 };
> >
> >                 return new BundleAnnotationFinder(packageAdmin, bundle,
> filter);
> >             }
> >         }
> >    <---
> > --
> > Ivan
>
>


-- 
Ivan

Mime
View raw message