views:

75

answers:

0

I want to deploy a HashMap of configuration to the JNDI tree of Glass Fish server. I am migrating a framework from Weblogic to GLassfish. Previously it was done via the following code..

Where the Environment is *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)); } } }

Can any one suggest how this can be achieved in Glassfish

Thanks in Advance.