Configuring and looking up a simple String via JNDI in WebSphere

折月煮酒 提交于 2019-12-01 18:33:32
McDowell

I believe you can use Name Space Bindings for this (under Environment, Naming, Name Space Bindings.)

Blurb:

Name Space Bindings

Use this page to configure a name binding of a constant string value, an enterprise bean, a CORBA CosNaming Naming Context or CORBA leaf node object, or an object that can be looked up by using JNDI.

DagR

Take a look at the article Using resource environment providers in WebSphere Application Server

It's written for WebSphere 5 or 6 but the idea should work for version 7 too. Basically you create a custom resource environment provider, which returns objects of your own type via a factory. The factory implements javax.naming.spi.ObjectFactory and gets its input from Websphere.

In my opinion this is a nice solution if you have a few configuration parameters but it can quickly become hard to maintain as the number of parameters grows.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!