Hello everybody,
I'm new user.
I'm trying to test my program witch get an url provider into my server (websphere):
//-----------------------------------------------------------------------------
private static final String REF_URL_SIGNEL ="url/myUrl";
JndiObjectFactoryBean jndiBean = new JndiObjectFactoryBean();
JndiTemplate jndiTemplate = new JndiTemplate();
jndiBean.setJndiTemplate(jndiTemplate);
URL url = null;
try {
InitialContext ic = new InitialContext();
url = (URL)jndiTemplate.lookup(REF_URL_SIGNEL);
} catch (NamingException e) {
LOG.error("error JNDI["+e+"]");
}
//-----------------------------------------------------------------------------
I wanted to how if it's possible to set my url/myUrl --> http://toto into the beginning of my junit test.
thank for your help.