如何确定运行应用程序的Application Server的类型? [英] How to determine type of Application Server an application is running on?

查看:69
本文介绍了如何确定运行应用程序的Application Server的类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的EJB3应用程序可以在Oracle AS或JBoss AS之上运行.有没有办法在运行时找出AS的类型?

Our EJB3 application can run on top of Oracle AS or JBoss AS. Is there a way to find out type of AS during runtime?

推荐答案

您可以在运行时使用反射来检查对象的具体类型,例如应用程序注入的 EJBContext .服务器.

You can check the concrete type of object at runtime using reflection, e.g. the EJBContext that is injected by the app. server.

这篇关于如何确定运行应用程序的Application Server的类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆