Kiran Dalvi
unread,Mar 15, 2004, 5:41:49 AM3/15/04You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
I want the detais about all the messages which are posted on a
particular JMS Queue.
As suggested, we used 'JMS Queue Sample Application'. The package for
the Application is " examples.jms.queue ".
There are 4 Java Programs ...
1) QueueBrowse.java
2) QueueReceive.java
3) QueueReceiveInTx.java
4) QueueReceiveInTx.java
This Application listens on JMS Queue -
weblogic.examples.jms.exampleQueue
and uses JMS-FACTORY as -
weblogic.examples.jms.QueueConnectionFactory
With thses parameters, the application works perfectly fine.
We are able to ....
A) Send messages to the JMS-QUEUE
(weblogic.examples.jms.exampleQueue).
B) Receive messages from the JMS-QUEUE
(weblogic.examples.jms.exampleQueue)
C) Browse through all the meeages on the JMS-QUEUE
(weblogic.examples.jms.exampleQueue)
We want to use JMS-QUEUE Browsing functionality for other JMS-QUEUE ::
com.bea.wli.bpm.EventQueue
We modified all above Java source files and changed following
variables ...
1) public final static String JMS_FACTORY :: changed to --
com.bea.wlpi.QueueConnectionFactory
2) public final static String QUEUE :: changed to --
com.bea.wli.bpm.EventQueue
We added following variables in all source files to support
Authentication ....
1) private static final String SECURITY_PRINCIPAL = "admin";
2) private static final String SECURITY_CREDENTIALS = "security";
We supplied these Security-Related parameters to InitialContext()
function by adding following code to all source files ....
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, SECURITY_PRINCIPAL);
env.put(Context.SECURITY_CREDENTIALS, SECURITY_CREDENTIALS);
With all these changes, we are able to,
Send messages to the JMS-QUEUE (com.bea.wli.bpm.EventQueue).
But when we try to run "QueueBrowse" program, to browse through the
messages on com.bea.wli.bpm.EventQueue,
we are getting following exception ...
Exception in thread "main" weblogic.jms.common.JMSSecurityException:
Access denied
to resource: type=<jms>, application=, destinationType=queue,
resource=WLI_BPM_Event, action=browse
Server side Stack-Trace says .......
Start server side stack trace:
weblogic.jms.common.JMSSecurityException: Access denied to resource:
type=<jms>,
application=, destinationType=queue, resource=WLI_BPM_Event,
action=browse
at weblogic.jms.JMSService.checkPermission(JMSService.java:1065)
at weblogic.jms.JMSService.checkBrowsePermission(JMSService.java:1081)
at weblogic.jms.frontend.FESession.browserCreate(FESession.java:1100)
at weblogic.jms.frontend.FESession.invoke(FESession.java:2253)
at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.jav
a:602)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsync(DispatcherImpl.j
ava:152)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchSyncFuture(DispatcherI
mpl.java:303)
at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:821)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:308)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
End server side stack trace
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundR
equest.java:109)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:127)
at weblogic.jms.dispatcher.DispatcherImpl_WLStub.dispatchSyncFuture(Unkn
own Source)
at weblogic.jms.dispatcher.DispatcherWrapperState.dispatchSync(Dispatche
rWrapperState.java:282)
at weblogic.jms.client.JMSSession.createBackEndBrowser(JMSSession.java:1
749)
at weblogic.jms.client.JMSQueueBrowser.<init>(JMSQueueBrowser.java:46)
at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1344)
at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1324)
at examples.jms.queue.QueueBrowse.init(QueueBrowse.java:66)
at examples.jms.queue.QueueBrowse.main(QueueBrowse.java:139)
Looking forward to your response regarding the same.
Regards,
Kiran Dalvi