{
log( "Deploying Jndi-Config " + deployJndiConfig + " to configuration Jndi-Config " + m_jndiConfig + "..." );
File jndiConfigFile = new File( m_jndiConfig );
XmlOptions options = new XmlOptions( );
options.setLoadStripWhitespace( );
JndiConfigDocument sourceConfig =
JndiConfigDocument.Factory.parse( new File( m_jndiConfig ),
options );
JndiConfigDocument.JndiConfig jndiConfig = sourceConfig.getJndiConfig( );
Map services = new HashMap( );
ServiceDocument.Service[] serviceArray = jndiConfig.getServiceArray( );
for ( int i = 0; i < serviceArray.length; i++ )
{
ServiceDocument.Service service = serviceArray[i];
services.put( service.getName( ),
service );
}
for ( int i = 0; i < m_jndiConfigFiles.size( ); i++ )
{
File config = (File) m_jndiConfigFiles.get( i );
JndiConfigDocument newConfig = JndiConfigDocument.Factory.parse( config, options );
ServiceDocument.Service[] newServices = newConfig.getJndiConfig( ).getServiceArray( );
for ( int j = 0; j < newServices.length; j++ )
{
ServiceDocument.Service newService = newServices[j];
String name = newService.getName( );
if ( services.containsKey( name ) )