Creating user info bean in JBoss
I'm a little bit stuck in a problem right now: I've got a JBoss Portal
which runs on a JBoss AS 4.2.3
. There are running some webapps on the ma开发者_开发问答chine which provide some portlets to users. Now I need a centralized solution:
Every time an user logs in I want to create a session bean
where some user information is hold. I'm using spring in all my webapps - as some extra information.
How can I achieve this? This session bean must be created asap when a login occurs - so I can catch it safely from my spring apps.
Several thoughts:
- Is there a possibility to recognize a login via a listener?
- Should I use a filter and check if
request.getRemoteUser()
isn't null?
maybe smth like
<bean id="userInfo" class="com.s.userInfo" scope="session"/>
in application-context? 'Session' can be changed with 'conversation', maybe.
精彩评论