geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Re: Geronimo 2.2 + Spring
Date Tue, 13 Sep 2011 02:10:47 GMT
Hi, the plan looks fine to me, and it is not usual to manual add j2ee-server
and j2ee-security in the dependency tree, except you would like to use some
security realm from server and other server provided functions, anyway, this
is not an issue.
For the jta-datasource and multiple roles, it is better to show more
detailed information if you would like the suggestions from the community
:-)
For the cxf dependency. Geronimo should find some webservice stuff in your
application, or it will not add the cxf dependency. Change
the org.apache.geronimo.jaxws.builder log level to debug will help to find
which is found.


2011/9/12 Ghetolay <ghetolay@gmail.com>

> Hi, thks for your time.
>
> I don't think I have a web service included in my project but I did use the
> classloader and cxf appear in my parent tree. I didnt even know what cxf
> was
> so it's must be a config or dependency mistake maded by me.My application
> is
> based on this
> http://struts.apache.org/2.2.3/docs/struts-2-spring-2-jpa-ajax.htmlstruts2
> tutorial .
>
> Here my classloader result (inverted) :
>
> [org.apache.geronimo.kernel.classloader.JarFileClassLoader
> id=com.medicis/MyProject/1.0/war]
>     ... console.dbpool/MyProjectDB/1.0/car]
>     ... console.realm/MyProjectRealm/1.0/car]
>     ... org.apache.geronimo.configs/concurrent/2.2.1/car]
>     ... org.apache.geronimo.configs/cxf/2.2.1/car]
>     ... org.apache.geronimo.configs/j2ee-server/2.2.1/car]
>     ... org.apache.geronimo.configs/jasper/2.2.1/car]
>     ... org.apache.geronimo.configs/jetty7/2.2.1/car]
>     ... org.apache.geronimo.configs/openejb/2.2.1/car]
>     ... org.apache.geronimo.configs/openjpa2/2.2/car]
>     ... org.apache.geronimo.framework/j2ee-security/2.2.1/car]
>
> "..." mean
> "org.apache.geronimo.kernel.config.ChildrenConfigurationClassLoader
> wrapping[org.apache.geronimo.kernel.classloader.JarFileClassLoader id="
>
>
> I'm giving you some more configuration file :
>
> - pom.xml (simplified to ease reading)
>
> struts2 version: 2.2.3
> spring version: 3.0.3.RELEASE
> hibernate version: 3.6.7.Final
> slf4j version 1.6.2
> ...
> <groupId>org.apache.struts</groupId>
>  <artifactId>struts2-core</artifactId>
>  <artifactId>struts2-sitemesh-plugin</artifactId>
>  <artifactId>struts2-spring-plugin</artifactId>
>   <exclusions>
>        <exclusion>
>                <artifactId>spring-context</artifactId>
>                <groupId>org.springframework</groupId>
>        </exclusion>
>        <exclusion>
>                <artifactId>spring-beans</artifactId>
>                <groupId>org.springframework</groupId>
>        </exclusion>
>        <exclusion>
>                <artifactId>spring-core</artifactId>
>                <groupId>org.springframework</groupId>
>         </exclusion>
>         <exclusion>
>                <artifactId>spring-web</artifactId>
>                <groupId>org.springframework</groupId>
>         </exclusion>
>   </exclusions>
> ...
> <groupId>javax.servlet</groupId>
> <artifactId>servlet-api</artifactId>
> <version>2.4</version>
> ...
> <groupId>javax.servlet</groupId>
> <artifactId>jsp-api</artifactId>
> <version>2.0</version>
> ...
> <groupId>org.springframework</groupId>
>   <artifactId>spring-orm</artifactId>
>   <artifactId>spring-web</artifactId>
> ...
> <groupId>org.hibernate</groupId>
>   <artifactId>hibernate-entitymanager</artifactId>
>   <artifactId>hibernate-core</artifactId>
> ...
> <groupId>org.slf4j</groupId>
>   <artifactId>slf4j-simple</artifactId>
>   <artifactId>slf4j-api</artifactId>
>
>
> - and my plan.xml wich actually is geronimo-web.xml :
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <web:web-app
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
> xmlns:client="
> http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
> xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
> xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
> xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
> xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
> xmlns:pers="http://java.sun.com/xml/ns/persistence"
> xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
> xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
>    <dep:environment>
>        <dep:moduleId>
>            <dep:groupId>com.medicis</dep:groupId>
>            <dep:artifactId>MyProject</dep:artifactId>
>            <dep:version>1.0</dep:version>
>            <dep:type>war</dep:type>
>        </dep:moduleId>
>        <dep:dependencies>
>            <dep:dependency>
>                <dep:groupId>console.dbpool</dep:groupId>
>                <dep:artifactId>MyProjectDB</dep:artifactId>
>            </dep:dependency>
>            <dep:dependency>
>                <dep:groupId>org.apache.geronimo.configs</dep:groupId>
>                <dep:artifactId>j2ee-server</dep:artifactId>
>                <dep:type>car</dep:type>
>            </dep:dependency>
>            <dep:dependency>
>                <dep:groupId>org.apache.geronimo.framework</dep:groupId>
>                <dep:artifactId>j2ee-security</dep:artifactId>
>                <dep:version>2.2</dep:version>
>                <dep:type>car</dep:type>
>            </dep:dependency>
>            <dep:dependency>
>                <dep:groupId>console.realm</dep:groupId>
>                <dep:artifactId>MyProjectRealm</dep:artifactId>
>                <dep:version>1.0</dep:version>
>                <dep:type>car</dep:type>
>            </dep:dependency>
>        </dep:dependencies>
>         <dep:hidden-classes>
>            <dep:filter>org.springframework</dep:filter>
>        </dep:hidden-classes>
>    </dep:environment>
>     <web:context-root>/MyProject</web:context-root>
>    <name:resource-ref>
>        <name:ref-name>jdbc/MyProjectDS</name:ref-name>
>        <name:resource-link>MyProjectDB</name:resource-link>
>    </name:resource-ref>
>    <web:security-realm-name>MyProjectRealm</web:security-realm-name>
>    <sec:security>
>        <sec:role-mappings>
>           <sec:role role-name="user">
>                <sec:principal name="UserGroup"
>
> class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
>                <sec:principal name="ManagerGroup"
>
> class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
>            </sec:role>
>            <sec:role role-name="manager">
>                <sec:principal name="ManagerGroup"
>
> class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
>            </sec:role>
>        </sec:role-mappings>
>    </sec:security>
> </web:web-app>
>
>
> I have difficulties to use my database pool as jta-datasource and to use
> multiple roles in my realm(infinite loading on login) but i saw lots of
> subject about it so i'll investigate a bit more about that. But if you see
> something wrong in my files you could save me time :)
>
> Thks again for your time.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Geronimo-2-2-Spring-tp3313502p3329690.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan

Mime
View raw message