我正在WebLogic 10.3.5上编写我的第一个Java EE 5应用程序。 并需要一些建筑建议。
当应用程序启动时,我需要打开与XMPP服务器的持久连接以发送即时消息。 消息将不断从表中提取,该表将由应用程序的另一部分填充。
在我看来,我不能使用容器管理对象,例如EJB,因为我无法控制对象和套接字连接生命周期。
Servlet是否适合以应用程序开头并持有持久套接字连接的进程?
I'm writing my first Java EE 5 app on WebLogic 10.3.5. and need some architectural advice.
When the app starts I need to open a persistent connection to an XMPP server to send Instant Messages. Messages will be constantly pulled from a table, which will be populated by another part of the app.
As I see it I can't use container managed objects for this, such as EJB, because I would then have no control over the object and socket connection lifecycle.
Is a Servlet an appropriate candidate for a process that starts with the app and holds a persistent socket connection?
更多推荐
发布评论