Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3752308
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:13:22+00:00 2026-05-19T09:13:22+00:00

In my application based on JBoss (version 5) I need to listen for UDP

  • 0

In my application based on JBoss (version 5) I need to listen for UDP packets.

The easiest way (and probably the only one ) is to open DatagramSocket on certain port (using JBoss @Service singleton bean) and call receive(…) method. The first part is pretty easy – I’ve tested it and works as expected. Second part – receiving packets is more complicated.

I am wondering about design of such a code. As it is stated in DatagramSocket javadoc, receive is a blocking operation – it blocks until packet is retrieved. How to code it to make sure that it is fast, scalable and thread-safe?

I thought about writing stateless beans that holds a reference to singleton with opened connection, and these beans are calling receive method – but I am not very sure how JBoss would manage them (one bean calls receive() and until packet arrives it is blocked).
Is there any pattern to use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:13:22+00:00Added an answer on May 19, 2026 at 9:13 am

    Open source frameworks like Apache Camel etc are meant to support these kind of use cases. They are well tested and proven to be working in production. My suggestion is to depend on those libraries than creating your own.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a Web Java based application running on JBoss with allowed maximum heap
I am currently developing an EJB 3.0 based application on the JBoss AS 5.0.0.GA
I've got a pretty ordinary Java EE application running on JBOSS. It uses the
I'm using Hibernate Validator in an application with EJB and Spring MVC. I'm using
I just started working on upgrading a small component in a distributed java application.
After upgrading from JBoss 4 to JBoss 5, I've noticed the most annoying regression.
I have been tasked to develop an interactive website using java & mysql: using
I've been using Seam 2 (also started looking into Java EE 6) in my
I am looking for libraries which can read RSS / ATOM feeds in my
I'm adding OpenID login to a small web app using Spring Security 2.0.5. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.