<commit_before>package com.ashtonit.odb.jndi;

import java.io.File;
import java.util.Enumeration;
import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.RefAddr;
import javax.naming.Reference;
import javax.naming.spi.ObjectFactory;

import com.orientechnologies.orient.core.db.OPartitionedDatabasePoolFactory;
import com.orientechnologies.orient.server.OServer;
import com.orientechnologies.orient.server.OServerMain;


/**
 * <p>
 * An implementation of {@link ObjectFactory} that returns an {@link OPartitionedDatabasePoolFactory} instance in
 * response to a JNDI lookup.
 * </p>
 * <p>
 * If the <code>configFile</code> attribute is present in configuration the OrientDB server will be started as an
 * embedded instance. If the attribute is not present it will just provide the {@link OPartitionedDatabasePoolFactory}
 * instance.
 * </p>
 * <p>
 * In a Tomcat web application, the name of this class is the value of the factory attribute of a
 * <code>&lt;Resource&gt;</code> tag. The parameters given in the table above are also specified as attributes of the
 * resource tag. The type attribute is
 * <code>com.orientechnologies.orient.core.db.OPartitionedDatabasePoolFactory.</code> The resource should always be a
 * singleton and a closeMethod attribute with the value "<code>close</code>" should also be present. The
 * <code>auth</code> attribute should have the value "<code>Container</code>". The server config file for OrientDB
 * should be passed in with the attribute "<code>configFile</code>" if you wish to run an embedded OrientDB server. The
 * maximum number of connections can be set with the <code>capacity<code> attribute.<br>
 * e.g.
 * </p>
 * 
 * <pre>
 * &lt;Resource
 *   auth="Container"
 *   capacity="100"<commit_msg>html fix<commit_after>package com.ashtonit.odb.jndi;

import java.io.File;
import java.util.Enumeration;
import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.RefAddr;
import javax.naming.Reference;
import javax.naming.spi.ObjectFactory;

import com.orientechnologies.orient.core.db.OPartitionedDatabasePoolFactory;
import com.orientechnologies.orient.server.OServer;
import com.orientechnologies.orient.server.OServerMain;


/**
 * <p>
 * An implementation of {@link ObjectFactory} that returns an {@link OPartitionedDatabasePoolFactory} instance in
 * response to a JNDI lookup.
 * </p>
 * <p>
 * If the <code>configFile</code> attribute is present in configuration the OrientDB server will be started as an
 * embedded instance. If the attribute is not present it will just provide the {@link OPartitionedDatabasePoolFactory}
 * instance.
 * </p>
 * <p>
 * In a Tomcat web application, the name of this class is the value of the factory attribute of a
 * <code>&lt;Resource&gt;</code> tag. The parameters given in the table above are also specified as attributes of the
 * resource tag. The type attribute is
 * <code>com.orientechnologies.orient.core.db.OPartitionedDatabasePoolFactory.</code> The resource should always be a
 * singleton and a closeMethod attribute with the value "<code>close</code>" should also be present. The
 * <code>auth</code> attribute should have the value "<code>Container</code>". The server config file for OrientDB
 * should be passed in with the attribute "<code>configFile</code>" if you wish to run an embedded OrientDB server. The
 * maximum number of connections can be set with the <code>capacity</code> attribute.<br>
 * e.g.
 * </p>
 * 
 * <pre>
 * &lt;Resource
 *   auth="Container"
 *   capacity="100"
{'fraction_non_alphanumeric': 0.0994550408719346, 'fraction_numerical': 0.0016348773841961854, 'mean_word_length': 4.836248012718601, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, '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': '4257563', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1043, 'n_words': 380}