JBoss modules definition for Envers

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

JBoss modules definition for Envers

Dimitris Andreadis
Hi there,

I am looking at the org.hibernate modules definition in AS7:
- <module xmlns="urn:jboss:module:1.0" name="org.hibernate">
...
- <dependencies>
...
   <module name="org.hibernate.envers" services="import" optional="true" />
   </dependencies>
</module>

Then at envers:
- <module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
...
- <dependencies>
   <module name="org.hibernate" />
...
   </dependencies>
</module>

Are cyclical dependencies allowed?

Also, what's the service="import" clause really about? What's a service in this context?

 From the doc:
https://docs.jboss.org/author/display/MODULES/Module+descriptors:
Specify whether this dependency's services* are imported and/or exported. Possible values
are "none", "import", or "export"; defaults to "none".

Thanks in advance
/D
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: JBoss modules definition for Envers

Ales Justin
I might miss some detail, but I hope this will help you for now.
(until David comes online) :-)

> I am looking at the org.hibernate modules definition in AS7:
> - <module xmlns="urn:jboss:module:1.0" name="org.hibernate">
> ...
> - <dependencies>
> ...
>   <module name="org.hibernate.envers" services="import" optional="true" />
>   </dependencies>
> </module>
>
> Then at envers:
> - <module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
> ...
> - <dependencies>
>   <module name="org.hibernate" />
> ...
>   </dependencies>
> </module>
>
> Are cyclical dependencies allowed?

Yes, as long as there are no exports in those involved modules.

> Also, what's the service="import" clause really about? What's a service in this context?

Afaik, this means you can see dep module' META-INF/services path/dir.

Imo, Envers wants for Hibernate to see this

Skywalker:main alesj$ unzip -c hibernate-envers-4.0.0.CR2.jar META-INF/services/org.hibernate.integrator.spi.Integrator
Archive:  hibernate-envers-4.0.0.CR2.jar
  inflating: META-INF/services/org.hibernate.integrator.spi.Integrator  
org.hibernate.envers.event.EnversIntegrator


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: JBoss modules definition for Envers

Magesh Kumar Bojan
In reply to this post by Dimitris Andreadis
> Are cyclical dependencies allowed?

Well, you can see it does allow ;), but it is a manual process to make sure we don't, as of now.

> Also, what's the service="import" clause really about? What's a service in this context?

import: The current module (me) who declares the dependency, can see the services declared in META-INF/services folder via ServiceLoader.
export: Export those above to any other modules that declares me as dependency.
none: None of the above.

Magesh
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: JBoss modules definition for Envers

Magesh Kumar Bojan
In reply to this post by Ales Justin
You bet me to it :)

Magesh
----- Original Message -----
From: "Ales Justin" <[hidden email]>
To: "Dimitris Andreadis" <[hidden email]>
Cc: [hidden email]
Sent: Monday, October 17, 2011 7:11:03 PM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: Re: [jboss-as7-dev] JBoss modules definition for Envers

I might miss some detail, but I hope this will help you for now.
(until David comes online) :-)

> I am looking at the org.hibernate modules definition in AS7:
> - <module xmlns="urn:jboss:module:1.0" name="org.hibernate">
> ...
> - <dependencies>
> ...
>   <module name="org.hibernate.envers" services="import" optional="true" />
>   </dependencies>
> </module>
>
> Then at envers:
> - <module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
> ...
> - <dependencies>
>   <module name="org.hibernate" />
> ...
>   </dependencies>
> </module>
>
> Are cyclical dependencies allowed?

Yes, as long as there are no exports in those involved modules.

> Also, what's the service="import" clause really about? What's a service in this context?

Afaik, this means you can see dep module' META-INF/services path/dir.

Imo, Envers wants for Hibernate to see this

Skywalker:main alesj$ unzip -c hibernate-envers-4.0.0.CR2.jar META-INF/services/org.hibernate.integrator.spi.Integrator
Archive:  hibernate-envers-4.0.0.CR2.jar
  inflating: META-INF/services/org.hibernate.integrator.spi.Integrator  
org.hibernate.envers.event.EnversIntegrator


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: JBoss modules definition for Envers

Scott Marlow
In reply to this post by Dimitris Andreadis
At the root, is the Hibernate optional dependency on Envers, that uses
Envers if present.  Envers also depends on Hibernate.


On 10/17/2011 09:20 AM, Dimitris Andreadis wrote:

> Hi there,
>
> I am looking at the org.hibernate modules definition in AS7:
> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate">
> ...
> -<dependencies>
> ...
>     <module name="org.hibernate.envers" services="import" optional="true" />
>     </dependencies>
> </module>
>
> Then at envers:
> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
> ...
> -<dependencies>
>     <module name="org.hibernate" />
> ...
>     </dependencies>
> </module>
>
> Are cyclical dependencies allowed?
>
> Also, what's the service="import" clause really about? What's a service in this context?
>
>   From the doc:
> https://docs.jboss.org/author/display/MODULES/Module+descriptors:
> Specify whether this dependency's services* are imported and/or exported. Possible values
> are "none", "import", or "export"; defaults to "none".
>
> Thanks in advance
> /D
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: JBoss modules definition for Envers

David Lloyd-2
In reply to this post by Ales Justin
On 10/17/2011 08:41 AM, Ales Justin wrote:

> I might miss some detail, but I hope this will help you for now.
> (until David comes online) :-)
>> I am looking at the org.hibernate modules definition in AS7:
>> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate">
>> ...
>> -<dependencies>
>> ...
>>    <module name="org.hibernate.envers" services="import" optional="true" />
>>    </dependencies>
>> </module>
>>
>> Then at envers:
>> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
>> ...
>> -<dependencies>
>>    <module name="org.hibernate" />
>> ...
>>    </dependencies>
>> </module>
>>
>> Are cyclical dependencies allowed?
>
> Yes, as long as there are no exports in those involved modules.

In modules 1.1, fully cyclic dependencies are allowed due to a new
linking algorithm.

>> Also, what's the service="import" clause really about? What's a service in this context?
>
> Afaik, this means you can see dep module' META-INF/services path/dir.
>
> Imo, Envers wants for Hibernate to see this
>
> Skywalker:main alesj$ unzip -c hibernate-envers-4.0.0.CR2.jar META-INF/services/org.hibernate.integrator.spi.Integrator
> Archive:  hibernate-envers-4.0.0.CR2.jar
>    inflating: META-INF/services/org.hibernate.integrator.spi.Integrator
> org.hibernate.envers.event.EnversIntegrator
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


--
- DML
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: JBoss modules definition for Envers

jtgreene
Administrator
In reply to this post by Scott Marlow
You could break the cyclic dep if hibernate supported using a separate
classloader to load an extension.

On 10/17/11 9:04 AM, Scott Marlow wrote:

> At the root, is the Hibernate optional dependency on Envers, that uses
> Envers if present.  Envers also depends on Hibernate.
>
>
> On 10/17/2011 09:20 AM, Dimitris Andreadis wrote:
>> Hi there,
>>
>> I am looking at the org.hibernate modules definition in AS7:
>> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate">
>> ...
>> -<dependencies>
>> ...
>>      <module name="org.hibernate.envers" services="import" optional="true" />
>>      </dependencies>
>> </module>
>>
>> Then at envers:
>> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
>> ...
>> -<dependencies>
>>      <module name="org.hibernate" />
>> ...
>>      </dependencies>
>> </module>
>>
>> Are cyclical dependencies allowed?
>>
>> Also, what's the service="import" clause really about? What's a service in this context?
>>
>>    From the doc:
>> https://docs.jboss.org/author/display/MODULES/Module+descriptors:
>> Specify whether this dependency's services* are imported and/or exported. Possible values
>> are "none", "import", or "export"; defaults to "none".
>>
>> Thanks in advance
>> /D
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: JBoss modules definition for Envers

Dimitris Andreadis
Thanx everyone!

On 17/10/2011 17:41, Jason T. Greene wrote:

> You could break the cyclic dep if hibernate supported using a separate
> classloader to load an extension.
>
> On 10/17/11 9:04 AM, Scott Marlow wrote:
>> At the root, is the Hibernate optional dependency on Envers, that uses
>> Envers if present.  Envers also depends on Hibernate.
>>
>>
>> On 10/17/2011 09:20 AM, Dimitris Andreadis wrote:
>>> Hi there,
>>>
>>> I am looking at the org.hibernate modules definition in AS7:
>>> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate">
>>> ...
>>> -<dependencies>
>>> ...
>>>       <module name="org.hibernate.envers" services="import" optional="true" />
>>>       </dependencies>
>>> </module>
>>>
>>> Then at envers:
>>> -<module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
>>> ...
>>> -<dependencies>
>>>       <module name="org.hibernate" />
>>> ...
>>>       </dependencies>
>>> </module>
>>>
>>> Are cyclical dependencies allowed?
>>>
>>> Also, what's the service="import" clause really about? What's a service in this context?
>>>
>>>     From the doc:
>>> https://docs.jboss.org/author/display/MODULES/Module+descriptors:
>>> Specify whether this dependency's services* are imported and/or exported. Possible values
>>> are "none", "import", or "export"; defaults to "none".
>>>
>>> Thanks in advance
>>> /D
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>

--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dimitris Andreadis
Software Engineering Manager
JBoss Application Server
by Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx

http://dandreadis.blogspot.com/
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev