• 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
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

EJB Design questions

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello !
I must write an application used to control several electronic devices accessed via sockets and providing a lot of other services.
As I need Web client interfaces, log utility, persistence, naming service, message services, I think I can use EJB technology. It is also for training and fun!
So I am going to start a little prototype based on jboss.
And of course I have some questions !
In this application, I would like to have a bean acting as a proxy, for each controled device. The problem is that beans are completly managed by the bean container. They can be recycled at anytime. I do not want this because enabling the communication between the proxy and the controled device takes 30 seconds. So, I would like to have all the proxies constructed only one time when the application start.
Is it possible ? Or do I have a serious flaw in my design ?
One of this device needs a nearly continuous socket polling, so I need different threads inside the proxy bean. Is it possible ?
Thanks in advance !
Olivier
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Olivier Scalbert:
Hello !
I must write an application used to control several electronic devices accessed via sockets and providing a lot of other services.
As I need Web client interfaces, log utility, persistence, naming service, message services, I think I can use EJB technology. It is also for training and fun!
So I am going to start a little prototype based on jboss.
And of course I have some questions !
In this application, I would like to have a bean acting as a proxy, for each controled device. The problem is that beans are completly managed by the bean container. They can be recycled at anytime. I do not want this because enabling the communication between the proxy and the controled device takes 30 seconds. So, I would like to have all the proxies constructed only one time when the application start.
Is it possible ? Or do I have a serious flaw in my design ?
One of this device needs a nearly continuous socket polling, so I need different threads inside the proxy bean. Is it possible ?
Thanks in advance !
Olivier



I don't think you can do any type of socket programming from a EJB container, except for Client socket i,e u cannot poll containers sockets.
 
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at JCA(Java Connector Architecture), it may help on some of your requirements.
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic