<commit_before>/* This class is part of the XP framework's EAS connectivity
 *
 * $Id$
 */

package net.xp_framework.easc.server;

import net.xp_framework.easc.server.Delegate;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Properties;

public class LookupDelegate implements Delegate {
    String jndiName;

    public LookupDelegate(String jndiName) {
        this.jndiName= jndiName;
    }

    public Object invoke() throws Exception {
        Properties env= new Properties();
		env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
		env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
		env.setProperty(Context.PROVIDER_URL, "jnp://ia.schlund.de:1099");     
        
        return (new InitialContext(env)).lookup(this.jndiName);
    }
}
<commit_msg>- Remove hardcoded jnp service properties<commit_after>/* This class is part of the XP framework's EAS connectivity
 *
 * $Id$
 */

package net.xp_framework.easc.server;

import net.xp_framework.easc.server.Delegate;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Properties;

public class LookupDelegate implements Delegate {
    String jndiName;

    public LookupDelegate(String jndiName) {
        this.jndiName= jndiName;
    }

    public Object invoke() throws Exception {
        return (new InitialContext()).lookup(this.jndiName);
    }
}

{'fraction_non_alphanumeric': 0.10297166551485833, 'fraction_numerical': 0.0027643400138217, 'mean_word_length': 4.027777777777778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3113048', 'n_tokens_mistral': 474, 'n_tokens_neox': 453, 'n_words': 99}