• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Writing to a JMS Queue via Timer Method.

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Annie McCall
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic