-
1. Re: Processing of EJB annotations in module
jaikiran Aug 24, 2012 7:57 AM (in response to lehvolk)What does your jboss-deployment-structure.xml look like?
-
2. Re: Processing of EJB annotations in module
lehvolk Aug 24, 2012 8:21 AM (in response to jaikiran)I don't use jboss-deployment-structure.xml. I create apps.common module with dependencies:
{code}
<dependencies>
<!-- some libs -->
<module name="apps.deploylibs" export="true"/>
<module name="com.microsoft.mssql" export="true"/>
<module name="com.sun.xml.bind" export="true"/>
<!-- cxf libs -->
<module name="org.apache.cxf" export="true"/>
<module name="javax.servlet.api" />
<module name="javax.jms.api" />
<module name="javax.ejb.api" />
<module name="javax.transaction.api" />
<module name="javax.enterprise.api" />
<module name="javax.xml.bind.api" />
<!-- this libs to process cxf annotations -->
<module name="javax.xml.ws.api" />
<module name="javax.jws.api" export="true"/>
<module name="javax.wsdl4j.api" export="true"/>
<module name="org.jboss.logging"/>
<module name="org.apache.log4j" />
<module name="org.apache.commons.io" export="true"/>
<module name="org.apache.commons.codec" export="true"/>
<module name="org.apache.commons.lang" export="true"/>
</dependencies>
{code}
and declare this module as global (standalone.xml)
{code}
<subsystem xmlns="urn:jboss:domain:ee:1.0">
<global-modules>
<module name="org.apache.commons.beanutils" slot="main"/>
<module name="org.apache.commons.collections" slot="main"/>
<module name="apps.common" slot="main"/>
<module name="com.microsoft.mssql" slot="main"/>
<module name="org.quartz" slot="main"/>
</global-modules>
</subsystem>
{code}
-
3. Re: Processing of EJB annotations in module
lehvolk Aug 24, 2012 8:26 AM (in response to lehvolk)I forget to mention dependencies for
apps.deploylibs
module:{code}
<dependencies>
<module name="javax.inject.api" export="true"/>
<module name="javax.api" export="true"/>
<module name="org.apache.commons.logging"/>
<module name="org.apache.httpcomponents" export="true"/>
<module name="org.antlr" export ="true"/>
<module name="org.jaxen"/>
</dependencies>
{code}
they will be added to apps.common module.
-
4. Re: Processing of EJB annotations in module
robbert1 Aug 24, 2012 9:13 AM (in response to lehvolk)I have the exact same problem with base classes coming from other deployments that I import using a jboss-deployment-structure.xml.
I was about to try to move the base class to my global module (which is to be my end solution) exactly as described above but I guess that doesn't work either...
I noticed so far @PostConstruct and @Resource not working when a Base class comes from outside of the same deployment.
ejb-jar using an annotated method from base class from other jar within the same ear --> works
ejb-jar using an annotated method from base class from other jar within other ear --> fails
ejb-jar using an annotated method from base class from other jar within global module --> fails
not sure about ManagedBean's exact behavior yet, however jboss 5.1 failed at that as well so it doesn't break any migration scenario.
-
5. Re: Processing of EJB annotations in module
lehvolk Aug 24, 2012 9:45 AM (in response to robbert1)Actually this is not a problem to move jar into ear but I don't get the mechanism of deployer. As I understand deployer should look throught super classes und get all annotated fields. But seems that It isn't true and I don't understand why. In cxf case I can understand problems but in this case I have no idea of this strange behaviour, does anybody have?.