I am working on upgrading our portal application from 2.4 to 2.6 Beta1, one issue I have
is the following code no longer works:
|
| ...
| @Depends("portal:service=Module,type=User")
| private RoleModule roleModule;
| ...
|
|
When I deploy the application, it complaints that portal:service=Module,type=User is not
yet installed, although I could find the MBean in the JMX Console.
Then I read the reference documentation, and it recommends accessing Identity Modules
using JNDI or IdentitIdentityServiceController. As I want to avoid JNDI lookup code in my
application, I chose to use IdentityServiceController:
|
| ...
| @Depends("portal:service=Module,type=IdentityServiceController")
| private IdentityServiceController identityServiceController;
| ...
|
| UserModule userModule =
(UserModule)identityServiceController.getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
| ...
|
|
Although it works fine now, but I do think it is kinda ugly. Is there any better to do
this in JBoss Portal 2.6 Beta1.
Thanks.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035521#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...