Java EE Servlet作为XMPP连接器的容器(Java EE Servlet as container for XMPP connector)

编程入门 行业动态 更新时间:2024-10-28 15:21:55
Java EE Servlet作为XMPP连接器的容器(Java EE Servlet as container for XMPP connector)

我正在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?

更多推荐

本文发布于:2023-08-04 13:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1417186.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接器   容器   Servlet   EE   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!