Hi,

I am using JBoss 3.0RC3.

I've got a stateful session bean which is associated with a Principal 
that has been authenticated in our application's security domain. When I 
try to send a message to a queue based MDB, I get the following 
exception:

18:14:00,821 INFO  [AgreementFacadeBean] Submitting agreement 20000416 
for assessment
18:14:01,087 ERROR [SecurityInterceptor] Authentication exception, 
principal=null
18:14:01,089 ERROR [JMSContainerInvoker] Exception in JMSCI message 
listener
java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
         java.lang.SecurityException: Authentication exception, 
principal=null
java.lang.SecurityException: Authentication exception, principal=null
         at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation
(SecurityInterceptor.java:169)
         at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:
118)
         at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
         at 
org.jboss.ejb.MessageDrivenContainer.invoke(MessageDrivenContainer.java:302)
         at 
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:
625)
         at 
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(
JMSContainerInvoker.java:973)
         at 
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:234)
         at 
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage
(SpyMessageConsumer.java:560)
         at 
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:377)
         at org.jboss.mq.SpySession.run(SpySession.java:220)
         at 
org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:173)
         at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
(PooledExecutor.java:642)
         at java.lang.Thread.run(Thread.java:496)

My queue is set up as follows in jbossmq-destinations-service.xml:

   <mbean code="org.jboss.mq.server.jmx.Queue"
         name="jboss.mq.destination:service=Queue,name=AssessmentQueue">
     <depends optional-attribute-
name="DestinationManager">jboss.mq:service=DestinationManager</depends>
   </mbean>

and the code to send the message:

                // Grab a reference to the assessment queue and create a 
connection to it.
                QueueConnectionFactory factory = 
(QueueConnectionFactory)mJMSContext.lookup(QUEUE_FACTORY_NAME);
                Queue queue = (Queue)mJMSContext.lookup(queueName);
                QueueConnection queueConnection = factory.createQueueConnection();
                try
                {
                        // Create a queue session and a queue sender to forward our 
message
                        QueueSession queueSession = 
queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
                        QueueSender queueSender = queueSession.createSender(queue);
                        
                        // Create an ObjectMessage to hold the agreement refnum so 
that it can
                        // be transmitted to the assessment processor.
                        ObjectMessage anObjectMessage = 
queueSession.createObjectMessage();
                        anObjectMessage.setObject(agreement.getRefNum());
                        
                        queueSender.send(anObjectMessage);
                }
                finally
                {
                        queueConnection.close();
                }

Any pointers or tips would be greatly appreciated!

Thanks,

Steve Coy


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to