GlassFish 中的 mysql 连接器是否有如此多的错误,或者只是我的问题?

发布于 2024-10-01 02:54:28 字数 347 浏览 0 评论 0原文

我正在使用(尝试)GlassFish v2.1.1 + MySQL 连接器 5.0.8 来自学 J2EE。我尝试使用 JPA 持久性开发一些简单的 Web 应用程序。当服务器启动时,部署一切顺利,但在几次部署之后,它开始表现得很奇怪,抛出各种异常并导致预部署失败。

例如,在部署时,它可能会抛出关于类的 ClassNotFoundException ,该类甚至不再存在(但之前有几次部署)!

如果服务器重新启动后它没有再次顺利部署,我会认为这是我的错(可能是一些配置错误)。我刚刚得到异常,重新启动服务器,然后“命令部署成功执行”。 :-\

但我不知道,运行时可能会留下一些复杂的依赖关系。简单地取消部署模块并再次部署它并没有帮助。

I'm using (trying) GlassFish v2.1.1 + MySQL connector 5.0.8 to teach myself J2EE. I try to develop some simple Web application with JPA persistence. Just when the server starts, deploys go smooth and everything, but after several deploys it starts acting weird, throwing all kind of exceptions and failing predeploy.

For example, on deploy it could throw ClassNotFoundException about class which is even not there anymore (but was there several deploys ago)!

I would have gathered it was my fault (some misconfiguration maybe) if it didn't deploy smoothly again after server restart. I just get the exception, restart the server, and bam - "Command deploy executed successfully". :-\

But maybe there's some intricate dependencies left in runtime, I don't know. Simply undeploying module and deploying it again does not help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百善笑为先 2024-10-08 02:54:28

这是主观的,但根据我的经验,重新部署总是在某些时候变得不稳定。有时事情没有得到应有的清理,有时某些部分没有按应有的方式释放内存,有时您会收到明确的PermGen错误,等等,在某些时候,您必须重新启动服务器(这也是为什么有些人从不在生产中使用重新部署的原因)。我接受这一点。

也就是说,严格回答您问题的标题,我认为 GlassFish 2 和 MySQL 连接器非常稳定且完全适合生产。但正如所暗示的,开发和生产对平台的压力并不相同。

This is subjective but to my experience, redeploys always become unstable at some point. Sometimes things don't get cleaned as they should, sometimes some parts don't release memory as they should, sometime you get an explicit PermGen error, etc and at some point, you have to restart the server (which is also why some people never use redeploy in production). I live with that.

That said, to strictly answer the title of your question, I consider GlassFish 2 and the MySQL Connector as very stable and totally production ready. But as hinted, development and production do not stress a platform the same way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文