[keycloak-dev] aggregate modules

Stian Thorgersen stian at redhat.com
Tue Jan 27 09:17:07 EST 2015


Does it make sense to hold off on extracting libs into modules and supporting loading providers from modules until after 1.1.0.Final?

It may be risky to introduce such a big change just before releasing a final? We can still add support for loading providers from the file-system as that's a much smaller change and only affects custom providers.

----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: "Stian Thorgersen" <stian at redhat.com>
> Cc: keycloak-dev at lists.jboss.org
> Sent: Tuesday, January 27, 2015 2:08:25 PM
> Subject: Re: [keycloak-dev] aggregate modules
> 
> Ok, it was meta-inf="import within jboss-structure.xml.  I had a typo in
> my persistence.xml file...I'm checking now to see if things work.  I'll
> try and implement some aggregate modules after make sure everything works.
> 
> FYI meta-inf="import" doesn't work within a module.xml file, so I
> assumed it wouldn't work inside jboss-structure.xml...
> 
> If you don't hear from me, my internet is either down or power is out,
> blizzard is here.
> 
> On 1/27/2015 6:03 AM, Stian Thorgersen wrote:
> > Had a play with this and I've got an example WAR loading persistence.xml
> > from a module working.
> >
> > To try it on WildFly 8.2.0.Final:
> >
> > 1. Build and deploy module + war to WildFly
> >
> > # git clone https://github.com/stianst/playtime.git
> > # cd playtime
> > # mvn install
> > # unzip jpa-jar/target/playtime-jpa-jar-1-SNAPSHOT-module.zip -d
> > $JBOSS_HOME
> > # cp jpa/target/playtime-jpa-1-SNAPSHOT.war
> > $JBOSS_HOME/standalone/deployments/
> >
> > 2. Start WildFly
> >
> > ----- Original Message -----
> >> From: "Stian Thorgersen" <stian at redhat.com>
> >> To: "Bill Burke" <bburke at redhat.com>
> >> Cc: keycloak-dev at lists.jboss.org
> >> Sent: Tuesday, January 27, 2015 8:37:09 AM
> >> Subject: Re: [keycloak-dev] aggregate modules
> >>
> >> If you commit what you have to a branch I can take a look
> >>
> >> ----- Original Message -----
> >>> From: "Bill Burke" <bburke at redhat.com>
> >>> To: keycloak-dev at lists.jboss.org
> >>> Sent: Monday, January 26, 2015 6:41:51 PM
> >>> Subject: Re: [keycloak-dev] aggregate modules
> >>>
> >>> I also tried this in jboss-deployment-structure.xml
> >>>
> >>>               <module name="org.keycloak.keycloak-connections-jpa"
> >>> services="import">
> >>>                   <imports>
> >>>                       <include path="META-INF/**"/>
> >>>                   </imports>
> >>>               </module>
> >>>
> >>>
> >>>
> >>> On 1/26/2015 12:18 PM, Bill Burke wrote:
> >>>> Can't find the magic...Keep getting this error:
> >>>>
> >>>> 12:15:21,803 INFO
> >>>> [org.hibernate.jpa.boot.internal.PersistenceXmlParser] (MSC service
> >>>> thread 1-7) HHH000318: Could not find any META-INF/persistence.xml file
> >>>> in the classpath
> >>>>
> >>>>
> >>>> persistence.xml is in this module:
> >>>>
> >>>>
> >>>> <module xmlns="urn:jboss:module:1.1"
> >>>> name="org.keycloak.keycloak-connections-jpa">
> >>>>        <resources>
> >>>>            <resource-root
> >>>> path="keycloak-connections-jpa-1.1.0.Final-SNAPSHOT.jar"/>
> >>>>            <!-- Insert resources here -->
> >>>>        </resources>
> >>>>        <exports>
> >>>>            <include path="META-INF/**" />
> >>>>        </exports>
> >>>>        <dependencies>
> >>>>            <module name="org.keycloak.keycloak-core"/>
> >>>>            <module name="org.keycloak.keycloak-model-api"/>
> >>>>            <module name="javax.persistence.api"/>
> >>>>            <module name="org.jboss.logging"/>
> >>>>            <module name="javax.api"/>
> >>>>            <module name="org.hibernate" services="import">
> >>>>                <imports>
> >>>>                <include path="META-INF/**" />
> >>>>            </imports>
> >>>>            </module>
> >>>>        </dependencies>
> >>>>
> >>>> </module>
> >>>>
> >>>>
> >>>> On 1/26/2015 7:26 AM, Stian Thorgersen wrote:
> >>>>>
> >>>>>
> >>>>> ----- Original Message -----
> >>>>>> From: "Bill Burke" <bburke at redhat.com>
> >>>>>> To: "Stian Thorgersen" <stian at redhat.com>
> >>>>>> Cc: keycloak-dev at lists.jboss.org
> >>>>>> Sent: Monday, January 26, 2015 1:17:21 PM
> >>>>>> Subject: Re: [keycloak-dev] aggregate modules
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On 1/26/2015 2:43 AM, Stian Thorgersen wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>> ----- Original Message -----
> >>>>>>>> From: "Bill Burke" <bburke at redhat.com>
> >>>>>>>> To: keycloak-dev at lists.jboss.org
> >>>>>>>> Sent: Monday, January 26, 2015 3:03:40 AM
> >>>>>>>> Subject: Re: [keycloak-dev] aggregate modules
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 1/24/2015 7:00 AM, Stan Silvert wrote:
> >>>>>>>>> On 1/23/2015 5:53 PM, Bill Burke wrote:
> >>>>>>>>>> Ran into a wall:
> >>>>>>>>>>
> >>>>>>>>>> I couldn't have an aggregate module.  service imports didn't seem
> >>>>>>>>>> to
> >>>>>>>>>> work so I had to create a dependency for everything within
> >>>>>>>>>> jboss-deployment-structure.xml.  I may revisit this as I had a lot
> >>>>>>>>>> of
> >>>>>>>>>> errors in my module defintions.
> >>>>>>>>> In Brno I can ask David about this.  Can you post your
> >>>>>>>>> jboss-deployment-structure.xml and your aggregate module.xml?
> >>>>>>>>>>
> >>>>>>>>>> I'm at a wall.  I can't get the JPA connections to find the
> >>>>>>>>>> Hibernate
> >>>>>>>>>> provider.  I"m not sure if it can't find persistence.xml or
> >>>>>>>>>> hibernate
> >>>>>>>>>> or
> >>>>>>>>>> what.  Tried importing hibernate in various places to no avail.
> >>>>>>>>>> Error
> >>>>>>>>>> Message isn't very helpful either:
> >>>>>>>>>>
> >>>>>>>>>> javax.persistence.PersistenceException: No Persistence provider
> >>>>>>>>>> for
> >>>>>>>>>> EntityManager named keycloak-default
> >>>>>>>>> Can you give me a scaled down reproducer for this one?  I can ask
> >>>>>>>>> around
> >>>>>>>>> and see if anyone knows a solution.
> >>>>>>>>
> >>>>>>>> I think this is another service import problem.
> >>>>>>>
> >>>>>>> Loading JPA in this way will work, but it's a bit of a PITA.
> >>>>>>> META-INF/persistence.xml isn't exported/imported by default, see
> >>>>>>> https://developer.jboss.org/message/828881#828881
> >>>>>>>
> >>>>>>> If you're fed up and commit your stuff I can take a look. I've gone
> >>>>>>> done
> >>>>>>> this in the past so should be able to get it to work again.
> >>>>>>>
> >>>>>>
> >>>>>> Zoinks...I'll try importing META-INF.
> >>>>>>
> >>>>>> Are we sure we want users dealing with JBoss Modules?
> >>>>>
> >>>>> Yes ;)
> >>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Bill Burke
> >>>>>> JBoss, a division of Red Hat
> >>>>>> http://bill.burkecentral.com
> >>>>>>
> >>>>
> >>>
> >>> --
> >>> Bill Burke
> >>> JBoss, a division of Red Hat
> >>> http://bill.burkecentral.com
> >>> _______________________________________________
> >>> keycloak-dev mailing list
> >>> keycloak-dev at lists.jboss.org
> >>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>>
> >> _______________________________________________
> >> keycloak-dev mailing list
> >> keycloak-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>
> 
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> 


More information about the keycloak-dev mailing list