protected void createAdminObject ( DeploymentBuilder builder , Connector connector , AdminObject ao ) throws DeployException { try { String aoClass = findAdminObject ( ao . getClassName ( ) , connector ) ; Class < ? > clz = Class . forName ( aoClass , true , builder . getClassLoader ( ) ) ; Object adminObject = clz . newInstance ( ) ; Collection < org . ironjacamar . common . api . metadata . spec . ConfigProperty > configProperties = findConfigProperties ( aoClass , connector ) ; Collection < org . ironjacamar . core . api . deploymentrepository . ConfigProperty > dcps = injectConfigProperties ( adminObject , configProperties , ao . getConfigProperties ( ) , builder . getClassLoader ( ) ) ; validationObj . add ( new ValidateClass ( Key . ADMIN_OBJECT , clz , configProperties ) ) ; org . ironjacamar . core . spi . statistics . StatisticsPlugin statisticsPlugin = null ; if ( adminObject instanceof org . ironjacamar . core . spi . statistics . Statistics ) statisticsPlugin = ( ( org . ironjacamar . core . spi . statistics . Statistics ) adminObject ) . getStatistics ( ) ; if ( builder . getResourceAdapter ( ) != null ) associateResourceAdapter ( builder . getResourceAdapter ( ) . getResourceAdapter ( ) , adminObject ) ; builder . adminObject ( new AdminObjectImpl ( ao . getJndiName ( ) , adminObject , dcps , ao , statisticsPlugin , jndiStrategy ) ) ; } catch ( Throwable t ) { throw new DeployException ( bundle . unableToCreateAdminObject ( ao . getId ( ) , ao . getJndiName ( ) ) , t ) ; } }
Create admin object instance