*
*/
public static JavaEEResource toExternalJndiJavaEEResource(
com.sun.enterprise.config.serverbeans.ExternalJndiResource rbean, ResourceInfo resourceInfo) {
ExternalJndiResource jr = new com.sun.enterprise.resource.beans.ExternalJndiResource(resourceInfo);
//jr.setDescription( rbean.getDescription() ); // FIXME: getting error
// sets the enable flag
jr.setEnabled( ConnectorsUtil.parseBoolean(rbean.getEnabled()) );
// sets the jndi look up name
jr.setJndiLookupName( rbean.getJndiLookupName() );
// sets the resource type
jr.setResType( rbean.getResType() );
// sets the factory class name
jr.setFactoryClass( rbean.getFactoryClass() );
// sets the properties
List<Property> properties = rbean.getProperty();
if (properties!= null) {
for(Property property : properties){
ResourceProperty rp =
new ResourcePropertyImpl(property.getName(), property.getValue());
jr.addProperty(rp);
}
}
return jr;
}