在Weblogic 10上向JNDI添加自定义对象 [英] Adding custom object to JNDI on Weblogic 10

查看:107
本文介绍了在Weblogic 10上向JNDI添加自定义对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Weblogic服务器管理控制台(Weblogic 10.0)或通过编辑服务器的配置文件(config.xml)将自定义对象(字符串或URL)添加到JNDI?

Is it possible to add a custom object (String or URL) to JNDI using Weblogic Server Administration Console (Weblogic 10.0) or by editing server's configuration file (config.xml)?

推荐答案

我不这么认为.引用在JNDI树中加载对象:

使用管理控制台,可以在JNDI树中加载WebLogic Server J2EE服务和组件,例如RMI,JMS,EJB和JDBC数据源.

Using the Administration Console, you can load WebLogic Server J2EE services and components, such as RMI, JMS, EJBs, and JDBC Data Sources, in the JNDI tree.

确实,我找不到使用控制台添加StringURL的方法.

And indeed, I couldn't find a way to add a String or URL using the console.

AFAIK,标准方法是在部署描述符(web.xml,ejb-jar.xml)中放入env-entry:

AFAIK, the standard way is to put an env-entry in your deployment descriptor (web.xml, ejb-jar.xml):

<env-entry>
    <env-entry-name>string/foo</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>foobar</env-entry-value>
</env-entry>

<env-entry>
    <env-entry-name>url/bar</env-entry-name>
    <env-entry-type>java.net.URL</env-entry-type>
    <env-entry-value>http://foobar/</env-entry-value>
</env-entry>

这篇关于在Weblogic 10上向JNDI添加自定义对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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