[jboss-as7-dev] How to prevent the server from adding implicit dependencies

Jason Greene jgreene at redhat.com
Fri Jul 15 11:23:06 EDT 2011


Hi Mylos, you have to remove it for every subdeployment that you don't want it to show up on. This is because we add it to everything in the ear when anything uses it. This is not ideal and we are going to restrict that to a smaller scope but in the meantime your jboss-deployment-structure needs a sub-deployment section for each war and jar. Also if you dont want stuff in ear/lib to see it you need the toplevel exclusion you are doing now.

Note though that once you get this working old hibernate versions have a bug in it's vfs scanning that triggers on AS7. Scott Marlow is working on a solution where we would ship an updated annotation scanning component that 3.x hibernates can use.

There is also a work around where you can list your entities directly in XML.

Lastly, we are also working on a pluggable jpa layer that would allow you to replace hib4 with  hib3 (or any other provider) as the jpa provider on a per deployment basis.

Sent from my iPhone

On Juljv 15, 2011, at 2:28 AM, "Mylos" <mylos78 at fmailbox.com> wrote:

> Hi !
> I'd like to port my EAR application which a different version of
> Hibernate than JBoss AS 7.
> I've added to my WEB-INF/lib my Hibernate libraries, however the
> application server chooses to use
> its own libraries (under modules) as it finds @PersistenceContext
> annotation in the Web application.
> 
> Reading up the docs, I've come up to jboss-deployment-structure.xml and
> tried:
> 
> <jboss-deployment-structure>
>   <deployment>
>    <exclusions>
>        <module name="org.hibernate" />
>    </exclusions>
>   </deployment>
> </jboss-deployment-structure>
> 
> However the app server still picks up the Hibernate libs from the
> modules. How can I prevent it doing it and use those provided by the
> application ?
> Thank you very much for your help,
> Mylos
> 
> 
> -- 
> http://www.fastmail.fm - Faster than the air-speed velocity of an
>                          unladen european swallow
> 
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev



More information about the jboss-as7-dev mailing list