|
FAQ has been edited by Jacek Laskowski (Jul 23, 2007). Change summary: Annotation handling with XBean's ClassFinder General
What spec version does OpenEJB support?OpenEJB supports the Enterprise JavaBeans 3.0 specification. What is the difference between OpenEJB and an application server like Geronimo?//TODO I thought OpenEJB is supposed to be related to EJB's only, what does tomcat integration have to do with OpenEJB?//TODO Can I run OpenEJB with a JVM for any vendor?//TODO Which version of Java is required to run OpenEJB?As mandated by EJB 3.0 spec Java SE 1.5 is required. Although it might work fine on the previous versions of Java SE, it's unsupported feature and should not be considered stable. Do I need Apache Maven to work with OpenEJB?Definitely not. OpenEJB build is based on it, but you should not be constrained at all. Can I start and stop OpenEJB from an IDE? If yes, which IDE is supported by OpenEJB?The short answer is yes. The longer one is expected to come soon. Does OpenEJB support Local interfaces?Local Interfaces are supported as of 1.0 beta1. Prior to 1.0, the local interface capabilities were in place. You can instruct the container system to treat all calls made between beans as EJB 2.0 Local calls by using the flag --local-copy=false when you start the server. Here is an example: ./openejb.sh start --local-copy=false Details on other startup flags are here How is Swizzle-Stream used?Swizzle - http://docs.codehaus.org/display/SWIZZLE/Home Swizzle-Stream appears to be used in only two classes in openejb: 1. org.apache.openejb.assembler.classic.JndiBuilder It is used in: public static class TemplatedStrategy, but this class does not appear to be used. Definitely used and supports this feature: http://openejb.apache.org/jndi-names.html The property "openejb.jndiname.strategy.class" allows these to be switched out (JndiBuilder line 53) and if you look in the Geronimo geronimo-openejb module's OpenEjbSystemGBean you can see that You have reminded me of a rather big mental todo which was we should be using that strategy as our default too! Would have switched it over but we have all our itest using the LegacyAddedSuffixStrategy as well as our examples. 2. org.apache.openejb.config.InitEjbDeployments This class is only used in /openejb-core/container/openejb-core/src/test, which appears to be unit tests, but not part of any shipped server. Sure it is. See o.a.openejb.config.ConfigurationFactory line 125 where it's added to the deployment chain. Geronimo also has this one customized ("openejb.deploymentId.format") in its OpenEjbSystemGBean. Not quite as documented yet, but basically the same MO as the "openejb.jndiname.format"; you can set the format of the deployment id for when it isn't explicitly set. Annotation handling with XBean's ClassFinderThe way we did it in OpenEJB and I think the way that made it into Geronimo was to continue to use the ClassFinder as normal, but instead of feeding it just the one class we walk up the inheritance chain and add the super classes like so: private ClassFinder createInheritedClassFinder(Class clazz) { List<Class> parents = new ArrayList<Class>(); parents.add(clazz); Class parent = clazz; while ((parent = parent.getSuperclass()) != null) { parents.add(parent); } return new ClassFinder(parents); } Then all the code that would use that ClassFinder to find annotated methods/fields can remain unchanged.
|
Unsubscribe or edit your notifications preferences
