2
我想將配置的HashMap部署到Glass Fish服務器的JNDI樹。我正在將一個框架從Weblogic遷移到GLassfish。以前它通過以下代碼完成。如何將配置部署到Glassfish服務器的JNDI樹
環境是weblogic.jndi.Environment;
public void deployConfiguration(HashMap configuration)
throws GenericFrameworkException {
Context ictx = null;
String configParameter = null;
Environment env = new Environment();
env.setReplicateBindings(false);
// get the NOT replicating initial context of this server
ictx = ServiceLocator.getNotReplicatingInitialContext();
if (ictx != null) {
Set e = configuration.keySet();
Iterator iter = e.iterator();
while (iter.hasNext()) {
configParameter = (String) iter.next();
this.addParameter(
ictx,
Constants.JNDI_SUB_PATH,
configParameter,
configuration.get(configParameter));
}
}
}
任何一個可以建議如何能在Glassfish的
感謝提前實現。