tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan S. Fisher" <>
Subject Re: Suggestions for socket listener
Date Sun, 25 Oct 2015 15:46:41 GMT
We had a similar problem: Take events from the Asterisk system and
broadcast them as Topics in ActiveMQ.

Solved it by having an ejb @Singleton @Startup that in a @Postconstruct
method called another @Singleton with a method marked @Asyncronous to
initialize the UDP socket. After that it was fairly simple @Resource
injections to send messages.

We violated some JEE rules along the way but it's extremely simple and it
works :)

On Sun, Oct 25, 2015 at 8:25 AM, Romain Manni-Bucau <>

> I d go for a jca connector. Come back to us if you have any issue or
> misunderstanding.
> Le 25 oct. 2015 14:21, "ChrisOwens" <> a écrit :
> > I have an application that makes extensive use of EJB and runs in a TomEE
> > server.  I have a new requirement to listen for UDP broadcast datagrams.
> I
> > understand that running a socket listener from a singleton bean is
> > non-compliant with EJB recommended practices, but I'm not sure what the
> > cleanest way to implement this is. I have begun to read about JCA
> adapters
> > but have not got far yet. I could also run a separate, standalone process
> > that listens for the datagrams and then emits JMS messages. Do you have
> any
> > recommendations?
> >
> > Thanks,
> >
> > /c
> >
> >
> >
> > --
> > View this message in context:
> >
> > Sent from the TomEE Users mailing list archive at
> >

Email Confidentiality Notice: The information contained in this 
transmission is confidential, proprietary or privileged and may be subject 
to protection under the law, including the Health Insurance Portability and 
Accountability Act (HIPAA). The message is intended for the sole use of the 
individual or entity to whom it is addressed. If you are not the intended 
recipient, you are notified that any use, distribution or copying of the 
message is strictly prohibited and may subject you to criminal or civil 
penalties. If you received this transmission in error, please contact the 
sender immediately by replying to this email and delete the material from 
any computer.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message