当然喽,最主要的是首先要有weblogic.jar 包喽
public String getWLConnectedDB()
{
String dbName = null;
String connectionName = "connectToMssqlPool";
//private MBeanHome localHome = null;
MBeanHome adminHome = null;
//private static String SERVER_NAME = "myserver";
String url = "t3://127.0.0.1:7001" ;
try
{
//localHome = (MBeanHome)Helper.getMBeanHome("weblogic","weblogic",url,SERVER_NAME);
adminHome = (MBeanHome)Helper.getAdminMBeanHome("weblogic","weblogic",url);
Set set =adminHome.getMBeansByType("JDBCConnectionPool");
Iterator it = set.iterator();
while(it.hasNext())
{
try
{
JDBCConnectionPoolMBean dm = (JDBCConnectionPoolMBean)it.next();
String conntionName = (String)dm.getAttribute("Name");
System.out.println("conntionName===="+conntionName);
if(connectionName.equalsIgnoreCase((String)dm.getAttribute("Name")))
{
Properties connProperties = dm.getProperties();
if(connProperties != null)
{
System.out.println("db======"+connProperties.getProperty("db"));
dbName = connProperties.getProperty("db");
}
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
catch(IllegalArgumentException iae)
{
System.out.println("Illegal Argument Exception: " + iae);
}
return dbName;
}
分享到:
相关推荐
weblogic.xml配置详解.txt
weblogic.xml配置详解,web服务器相关配置
weblogic.xml配置详解,web服务器相关配置.zip
weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic.xml详解weblogic...
application.xml配置文件详解 application.xml配置文件详解 application.xml配置文件详解
WebLogic 配置文件(config.xml)包含了大量很直观的与性能有关的参数,能通过配置环境与应用程序得到很好的优化。基于系统的需要调整这些参数不仅能改善单个点的性能,而且能提高整个应用程序性能的可衡量性。
weblogic.xml 部署描述大全weblogic.xml 部署描述大全weblogic.xml 部署描述大全weblogic.xml 部署描述大全
weblogic .xml配合springboot部署weblogic代码.rar一起使用
weblogic.xml部署文件详细说明
weblogic9.x配置部署
Weblogic中MIME的默认配置文件 文件名称:domain/config/mimemappings.properties 格式如下: js=text/javascript 个人觉得设置完后,Weblogic可能要重启一下。
WebLogic是美国Oracle公司出品的一个application server,确切的说是一个基于JAVAEE架构的中间件,WebLogic是用于开发、集成、部署和管理大型分布式Web应用、网络应用和数据库应用的Java应用服务器。将Java的动态...
NULL 博文链接:https://tianshidehuhuan.iteye.com/blog/1157705
Weblogic 9.1.x 配置秘笈 <br>Weblogic从安装到配置运行全图文教程。适用于初学者。
Oracle WebLogic Server 12.2.1.4 2020年7月发布的累积更新补丁包 p31537019_122140_Generic 主要修复各种Bug和安全漏洞等问题 安装之前须先卸载老的补丁 遭到过攻击的服务器、域 建议删除域并重建
weblogic日志报如下错误原因及解决方法: WebLogic Server 9.2 Repeatedly Throws: java.lang.AssertionError: Registered more than one instance with the same objectName
weblogic下转换oracle 的clob类型经常报转型错误,本例子通过反射解决weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB转型成oracle.sql.CLOB问题
Oracle的高危远程代码执行漏洞(CVE-2018-2893),通过该漏洞攻击...WebLogic 10.3.6.0 WebLogic 12.1.3.0 WebLogic 12.2.1.2 WebLogic 12.2.1.3 解决方案: 1.控制T3协议的访问 2.升级到 jdk-8u20以上的版本 3.升级补丁