[Messaging, JMS & JBossMQ] - MDB calls stateful bean
by doktora
Is it OK if an MDB that receives messages from a durable topic calls on a stateful bean (indirectly) to process them.
The stateful bean is created and managed by an MBean at system start-up.
The MDB calls methods in the MBean which access the stateful bean:
Here is some pseudo-code:
| @Service
| public class MyMBean implments MyMBeanInterface, MBeanRegistration
| {
| @EJB private MyStatefulBeanInterface statefulBean;
|
| public void onMessage(Object msg) { statefulBean.process(msg); }
|
| }
|
| -----------
|
| @MessageDriven
| public class MyMessageReceiver implements MessageListener
| {
| public void onMessage(Message msg)
| {
| MyMBeanInterface mbean = MBeanProxyExt.create(....);
|
| mbean.onMessage( ((ObjectMessage)msg).getObject() );
| }
| }
|
|
Is there any design problem with this?
Are the calls coming from JMS serialized or is there no guarantee that asynchronous calls will be made to the Stateful bean?
Would there be any issues to watch out for if this was to live in a cluster and a lot of messages come in (up to a hundred a second at times)? Would it be a replication nightmare?
I've been pondering on these questions and have some reservations as to whether the above scenario can work reliably in a production environment.
Any input would be greatly appreciated!
Thanks,
doktora
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987432#3987432
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987432
19Â years, 7Â months
[JBoss Portal] - Re: JBoss Portal LDAP Setup
by bdaw
Unless you configured everything well what you are missing is that each user must belong to "Authenticated" role to be authorized to access portal resources. The mechanism in portal is that in IdentityLoginModule after user credentials are confirmed membership in role "Authenticated" is injected. You will find it in configuration:
<application-policy name="portal">
| <authentication>
| <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">
| <module-option name="unauthenticatedIdentity">guest</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| <module-option name="password-stacking">useFirstPass</module-option>
| </login-module>
| </authentication>
| </application-policy>
Look in portal-server.war web.xml - servlets have:
<security-role-ref>
| <role-name>Authenticated</role-name>
| <role-link>Authenticated</role-link>
| </security-role-ref>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987427#3987427
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987427
19Â years, 7Â months
[JBoss Portal] - Re: Personalized portal general question
by Peter.Coppens
Hello,
In the context of my attempts to create a personalized login page for each user with content extracted from the cms, I was thinking along the lines of a temporary (and unsecure) hack where I populate the portlets on the users' page with cms information that is retrieved based on the users' login name.
I would e.g. have a separate cms folder for each user and get the contents from within that cms folder.
One approach could be to make a new version of the CMSPortlet (I am asuming that should not be to difficult). On the other hand I am tempted to try and achieve this in jsp using something along the lines of the JSPPortlet example.
So, I am looking for some help/advice on the following items
1/ Is one of the above approaches valid and which one is the better one
2/ Are there any other alternatives?
3/ Is there a CMS taglib available I could use if I go the JSP way?
All help, advice or pointer to helpful information is warmly welcomed
Thanks,
Peter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987426#3987426
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987426
19Â years, 7Â months