[jboss-user] [JBoss Portal] - Re: How to implement a custom identity model for JBoss Portal?
Thomas Raab
do-not-reply at jboss.com
Tue Nov 22 05:53:38 EST 2011
Thomas Raab [http://community.jboss.org/people/prisemut] created the discussion
"Re: How to implement a custom identity model for JBoss Portal?"
To view the discussion, visit: http://community.jboss.org/message/637677#637677
--------------------------------------------------------------
Hi!
After several days of investigation I finally found the solution.
The element "class" of standardidentity-config.xml must reference the corresponding module, e.g. for User, it has to
reference the implementation of UserModule (and not the implementation of User itself: MyUserImpl!!!),
and the same for Role, Membership and UserProfile.
So I implemented the interfaces UserModule, RoleModule, etc. But not directly, instead I extended UserModuleService,
RoleModuleService etc. to save some work. The missing properties I mentioned in my last post are no longer necessary then
and can be removed.
The standardidentity-config.xml now looks like this:
<module>
<type>User</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=User</service-name>
<class>com.myCompany.MyUserModuleImpl</class>
<config>
<option>
<name>jNDIName</name>
<value>java:/portal/UserModule</value>
</option>
</config>
</module>
<module>
<type>Role</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=Role</service-name>
<class>com.myCompany.MyRoleModuleImpl</class>
<config>
<option>
<name>jNDIName</name>
<value>java:/portal/RoleModule</value>
</option>
</config>
</module>
<module>
<type>Membership</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=Membership</service-name>
<class>com.myCompany.MyMembershipModuleImpl</class>
<config>
<option>
<name>jNDIName</name>
<value>java:/portal/MembershipModule</value>
</option>
</config>
</module>
<module>
<type>UserProfile</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=UserProfile</service-name>
<class>com.myCompany.MyUserProfileModuleImpl</class>
<config>
<option>
<name>jNDIName</name>
<value>java:/portal/UserProfileModule</value>
</option>
</config>
</module>
In order to implement those interfaces I had to add the following dependencies to the pom.xml:
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>common-common</artifactId>
<version>1.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-common-client</artifactId>
<version>3.2.3</version>
<scope>provided</scope>
</dependency>
Now everthing is working as expected: the server is starting and I can login. :-)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637677#637677]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2011]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111122/00807a80/attachment.html
More information about the jboss-user
mailing list