package com.eactive.eai.common.util;

import org.springframework.jndi.JndiObjectFactoryBean;

import com.eactive.eai.rms.client.util.ContainerUtil;

public class JndiObjectFactoryBeanForElink extends JndiObjectFactoryBean {
	public void setJndiName(String jndiName) {
        super.setJndiName(jndiName);

        if (ContainerUtil.get() == ContainerUtil.TOMCAT) {
            super.setResourceRef(true);
        } else if (ContainerUtil.get() == ContainerUtil.WEBLOGIC) {
            super.setResourceRef(false);
        } else if (ContainerUtil.get() == ContainerUtil.JBOSS) {
            super.setResourceRef(false);
        } else if (ContainerUtil.get() == ContainerUtil.WEBSPHERE) {
        	super.setResourceRef(false);
        } else {
            super.setResourceRef(false);
        }
    }
    public String getJndiName() {
    	return super.getJndiName();
    }

}
