[Beginners Corner] - Re: Login for Web-Application
by PeterJ
First, when posting xml content, bracket it with [ code]..[ code ] (without the spaces). you can easily do this by selecting the text and clicking the Code button. I noticed that you used < code > brackets, but that will not work other than forcing fixed-width font, the tags within the xml can still cause problems.
Try adding a WEB-INF/jboss-web.xml files, containing the following:
<jboss-web>
| <security-domain>java:/jaas/myloginmodule</security-domain>
| </jboss-web>
and then add the following to the server/xxx/data/login-config.xml file:
<application-policy name = "myloginmodule">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
| flag = "required">
| <module-option name="usersProperties">props/users.properties</module-option>
| <module-option name="rolesProperties">props/roles.properties</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073710#4073710
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073710
18Â years, 11Â months
[EJB 3.0] - Re: JMS: using Websphere MQ as JMS provider.
by adamhmitchell
I think that ClassCastException happens when the JBossMQ code pulls your IBM MQ class from JNDI. You're still using the JBoss MDB JMS Provider.
I was in the same boat trying to use Sun's IMQ server. This is how I got it working:
| package elm.mdb;
|
| import javax.ejb.ActivationConfigProperty;
| import javax.ejb.MessageDriven;
| import javax.ejb.Remote;
| import javax.jms.Message;
| import javax.jms.MessageListener;
| import org.jboss.annotation.ejb.ResourceAdapter;
|
| import org.apache.log4j.Logger;
|
| @MessageDriven(mappedName = "jms/LoggingEventBean", activationConfig = {
| @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
| @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
| @ActivationConfigProperty(propertyName = "clientId", propertyValue = "LoggingEventBean"),
| //@ActivationConfigProperty(propertyName = "destination", propertyValue = "elm_topics_LoggingEvent_default"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "EnterpriseLoggingTopic"),
| @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "LoggingEventBean")
| //@ActivationConfigProperty(propertyName = "UserName", propertyValue = "guest"),
| //@ActivationConfigProperty(propertyName = "Password", propertyValue = "guest")
| })
| @ResourceAdapter("imqjmsra.rar")
| public class LoggingEventBean implements MessageListener {
|
| static Logger logger = Logger.getLogger(LoggingEventBean.class);
|
| public LoggingEventBean() {
| }
|
| public void onMessage(Message message) {
| logger.info("got message");
|
| }
|
| }
|
I still don't know if this is the 'right' way to do it. Let me know if you find anything different!
AM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073703#4073703
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073703
18Â years, 11Â months