1 23 24 package org.objectweb.jorm; 25 26 import org.objectweb.perseus.connector.ra.fos.FosAttributeControler; 27 import org.objectweb.perseus.connector.ra.fos.FosManagedConnectionFactory; 28 import org.objectweb.util.monolog.api.LoggerFactory; 29 30 import javax.resource.spi.ManagedConnectionFactory ; 31 import java.util.Properties ; 32 33 36 public class FosAdapterPropertiesSetter implements JcaAdapterPropertiesSetter { 37 public static final String FOS_URL = "fos.ConnectionURL"; 38 39 45 public void assignProperties(ManagedConnectionFactory mcf, Properties prop, LoggerFactory lf) 46 throws Exception { 47 FosAttributeControler ra = (FosAttributeControler) mcf; 48 ra.setConnectionURL(prop.getProperty(FOS_URL)); 50 ra.setLoggerFactory(lf); 51 ra.setInitializeAtStartUp(false); 52 ra.setLoggerBaseName("test"); 53 ((FosManagedConnectionFactory) ra).start(); 54 } 55 } 56 | Popular Tags |