org.openejb.alt.config
Class ServiceUtils

java.lang.Object
  extended by org.openejb.alt.config.ServiceUtils

public class ServiceUtils
extends java.lang.Object

Utility methods for reading, writing, and configuring services

Author:
David Blevins

Field Summary
static java.lang.String defaultProviderURL
           
static Logger logger
           
static Messages messages
           
 
Constructor Summary
ServiceUtils()
           
 
Method Summary
static java.util.Properties assemblePropertiesFor(java.lang.String confItem, java.lang.String itemId, java.lang.String itemContent, java.lang.String confFile, ServiceProvider service)
           
static ServiceProvider getServiceProvider(Service service)
           
static ServiceProvider getServiceProvider(java.lang.String id)
          org.openejb#Default JDBC Connector

Default JDBC Connector

org.postgresql#JDBCService

static java.util.Properties loadProperties(java.io.InputStream in, java.util.Properties defaults)
           
static java.util.Properties loadProperties(java.lang.String pFile)
           
static java.util.Properties loadProperties(java.lang.String propertiesFile, java.util.Properties defaults)
           
static ServicesJar readServicesJar(java.lang.String providerName)
          Opens the specified jar file, locates the service-jar.xml file,

unmarshals it to a java object and returns it.

static void writeServicesJar(java.lang.String xmlFile, ServicesJar servicesJarObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultProviderURL

public static final java.lang.String defaultProviderURL
See Also:
Constant Field Values

messages

public static Messages messages

logger

public static Logger logger
Constructor Detail

ServiceUtils

public ServiceUtils()
Method Detail

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.