Hi Sven; Currently webbeans-impl module depends on "javax.interceptor.*" package(not all EJB stuff) for configuring interceptors(that is defined in EJB interceptor specification) on simple Managed Beans that are not EJB Session Beans.
For example you can use @Interceptors, @AroundInvoke, @ExcludeClassInterceptors, @ExcludeDefaultInterceptors for simple POJO based managed beans that are not EJB Session bean. We have a plan that separates core DI functionality from "webbeans-impl" module. This will enable us to remove Java EE dependencies, such as "interceptors, transactions etc." from webbeans-impl. >>>Is the javax.ejb package also necessary for running OWB? This is not necessary to use OWB but "javax.interceptor.*" is necessary. OWB supports EJB Session Beans using OpenEJB within Tomcat. In this configuration OpenEJB provides all necessary libraries. I wrote a blog that explains how to use OWB with OpenEJB in Tomcat. You can reach my blog at http://gurkanerdogdu.blogspot.com. Thanks; --Gurkan 2009/11/1 Sven Linstaedt <[email protected]> > Hi Gurkan, > > actually I am using the maven artifact from > http://download.java.net/maven/1/javax.ejb/. Because CDI can be used in > environments not having a full javaee stack, I would like to use CDI and > thereby the javax.interceptor package without having the ejb stuff in the > classpath too. Is the javax.ejb package also necessary for running OWB? > > br, Sven > > > 2009/11/1 Gurkan Erdogdu <[email protected]> > > > Hi; > > > > General > > -------------------- > > In Java EE 5, interceptors are delivered via seperate EJB3 interceptors > > specification. I think that this will be the same in the Java EE 6 or it > > will be contained in its own Java Interceptors Specification that is > > separately developed from EJB3.1 specification. It will be go into > > "javax.interceptor.*" package not "javax.annotation." > > > > OWB Side > > -------------------- > > > > Firstly I assume that "ejb-api" --> "geronimo-interceptor_3.0_spec.jar" > > > > *webbeans-api* module contains "javax.interceptor.InteceptorBinding" and > > "javax.interceptor.Interceptor" classes. They are removed when those > classes > > will be developed in new version of the "geronimo-interceptor jar." > > > > Currently webbeans-impl uses "geronimo-interceptor-api" to configure > > interceptors that are defined in the EJB specification on "ManagedBeans" > > . So, if you use OWB in tomcat or jetty then "interceptor" jar must be on > > the classpath. If you look at pom.xml, it is defined as optional. If you > > create a web application with OWB and your container already contains > > "interceptor" jar on its classpath, no need to add "interceptor" jar > into > > your war archive. > > > > For example, if you look at the "ejb-sample", its "geronimo-interceptor" > > jar is defined as "provided" becuase "OpenEJB in Tomcat " already > provides > > "interceptor" jar. But if you look at guess or reservation sample, > > "interceptor" jar is bundled with war because Standalone Tomcat or Jetty > > does not contain "interceptor" jar. > > > > Hope this helps; > > > > Thanks; > > > > --Gurkan > > > > > > > > > > ________________________________ > > From: Sven Linstaedt <[email protected]> > > To: [email protected] > > Sent: Sun, November 1, 2009 3:35:40 PM > > Subject: Standalone artifact for javax.interceptor.* > > > > Hi, does anyone know whether the package javax.interceptor.* is going to > > become a standalone artifact like it happened to javax.annotation.* ? > > Currently you have to deliver the whole ejb-api, when deploying a war > with > > OWB in a simple servlet container like tomcat or jetty. > > > > br, Sven > > > > > > > > > > > -- Gurkan Erdogdu http://gurkanerdogdu.blogspot.com
