Forums Register Login

Writing to a JMS Queue via Timer Method.

+Pie Number of slices to send: Send
Hi,
My server is BEA WebLogic Server 8.1.
I currently inherited a JMS app where it uses an Asyncronous Message bean.
The logic in this bean is very simple. It has an OnMessage method which looks at the input message. This input message is just a textmessage, depending on it's value it will implement different processes.
For example:


I have a listener which gets kicked off when the server starts.
This listener kicks off a method (let's say around every 10 minutes) that attempts to write to the JMS queue.

Now is where the problem occurs.

Here is the logic that attempts to send a text message to the queue.





The exception occurs on this line:

queueSender = queueSession.createSender(queue);

I get this error:





I think I am getting this because the process is being kicked off on the server rather than from an user.

Does anyone know how to do this?

I tried using an anonymous producer but doing this:




But then I got an invalid destination error.


Has anyone attempted to this before ( Write to a JMS queue from a method which was set off with a timer)?

Any help would be greatly appreciated,

[ February 06, 2008: Message edited by: Annie McCall ]
[ February 06, 2008: Message edited by: Annie McCall ]
+Pie Number of slices to send: Send
Hi All,

I do have an answer to my JMS Security Exception. I will post the
solution for any JMS newbies like myself.

It was not an application code fix but rather a change in the security
configuration of my JMS queue on my Weblogic Server.

Since there was no "real" user, the user context is "guest". All I
needed to do was add an 'acl entry' for guest in the send action of my
JMS queue.

An 'acl entry' is really adding a row in a table in the realm database.

For example:
<CODE>
insert into weblogic.realm_acl_entries values ('realm_domain','guest', 'JMS QUEUE NAME','send', null);</CODE>

Hope this information helps someone who may encounter the same problem.
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3511 times.
Similar Threads
can I integrate JMS with Servlets???
MDB
A simple JNDI question....
New To JMS
Message Driven Beans
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:06:20.