org.openejb.alt.config
Class ServiceUtils
java.lang.Object
org.openejb.alt.config.ServiceUtils
public class ServiceUtils
- extends java.lang.Object
Utility methods for reading, writing, and configuring services
- Author:
- David Blevins
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultProviderURL
public static final java.lang.String defaultProviderURL
- See Also:
- Constant Field Values
messages
public static Messages messages
logger
public static Logger logger
ServiceUtils
public ServiceUtils()
getServiceProvider
public static ServiceProvider getServiceProvider(Service service)
throws OpenEJBException
- Throws:
OpenEJBException
getServiceProvider
public static ServiceProvider getServiceProvider(java.lang.String id)
throws OpenEJBException
- org.openejb#Default JDBC Connector
Default JDBC Connector
org.postgresql#JDBCService
- Parameters:
id
-
- Returns:
- ServiceProvider
- Throws:
OpenEJBException
readServicesJar
public static ServicesJar readServicesJar(java.lang.String providerName)
throws OpenEJBException
- Opens the specified jar file, locates the service-jar.xml file,
unmarshals it to a java object and returns it. If there is no
service-jar.xml in the jar an exception will be thrown.
- Parameters:
providerName
-
- Returns:
- ServicesJar
- Throws:
OpenEJBException
writeServicesJar
public static void writeServicesJar(java.lang.String xmlFile,
ServicesJar servicesJarObject)
throws OpenEJBException
- Throws:
OpenEJBException
assemblePropertiesFor
public static java.util.Properties assemblePropertiesFor(java.lang.String confItem,
java.lang.String itemId,
java.lang.String itemContent,
java.lang.String confFile,
ServiceProvider service)
throws OpenEJBException
- Throws:
OpenEJBException
loadProperties
public static java.util.Properties loadProperties(java.lang.String pFile)
throws OpenEJBException
- Throws:
OpenEJBException
loadProperties
public static java.util.Properties loadProperties(java.lang.String propertiesFile,
java.util.Properties defaults)
throws OpenEJBException
- Throws:
OpenEJBException
loadProperties
public static java.util.Properties loadProperties(java.io.InputStream in,
java.util.Properties defaults)
throws OpenEJBException
- Throws:
OpenEJBException
Copyright © 1999-2011 OpenEJB. All Rights Reserved.