• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mapping jms resource from jpa entity

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a jpa entity that has behavior, namely a method to send some message to a JMS queue. Since this entity is running inside a JEE container environment, the JMS specifics are being injected in the entity class itself, like this:

@Resource(name="jms/jmsQueue")
private Destination notifQueue;
@Resource(name="jms/jmsConnectionFactory")
private ConnectionFactory connectionFactory;

this entity has a method that uses the resources above, which gets called by the timeout method of a stateless EJB.

Since the resources are defined in the Entity and not in the calling EJB, other than using the [i]mappedName[/i] annotation attribute, where can I define a jndi mapping for these resources ? The ejb deployment descriptor ? persistence.xml ? There seems to be no place in any of them for this use case...

Can anyone help ?

Thanks
 
The moustache of a titan! The ad of a flea:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic