Package sos.connection

Examples of sos.connection.SOSConnection

user=<username>

password=<password>

Copyright: Copyright (c) 2003

Company: SOS GmbH

@author Ghassan Beydoun @resource ojdbc14.jar sos.util.jar$Id: SOSConnection.java 14692 2011-06-28 10:32:06Z al $

           
            // template sample with settings
            // .. create logger
            SOSStandardLogger logger = new SOSStandardLogger(9);
            // .. create connection
            SOSConnection connection = SOSConnection.createInstance("/scheduler/config/sos_settings.ini", logger);
            connection.connect();
            // .. create settings instance from connection
            SOSConnectionSettings settings = new
            SOSConnectionSettings( connection,          // connection instance
                                  "SETTINGS",           // settings table
                                  logger);
View Full Code Here


   */
  public static void test3(String[] args, String iniSOSConnectionFile, String requiredDefaultFile, sos.util.SOSLogger sosLogger) {
    try {
      System.out.println("~~~~~~~~~~~~~~~~~~ testen von SOSConnectionSettings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
      //Connection erstellen
      SOSConnection sosConnection = null;

      try {

        System.out.println("DB Connecting.. .");
        sosConnection = SOSConnection.createInstance(iniSOSConnectionFile, sosLogger);
        sosConnection.connect();
        System.out.println("DB Connected");
      }
      catch (Exception e) {
        System.out.print(e.toString());
      }
View Full Code Here

     * noch connect() und sp�ter disconnect() aufgerufen werden.
     * @throws Exception
     */
    public static SOSConnection getOrderConnection(SOSConnection connection, Job_impl job) throws Exception {
       
      SOSConnection localConnection = null;
        Order order = null;
       
        boolean useManagedConnection = true;
        // boolean rc = false;
        HashMap result = null;
View Full Code Here

     * @return Connection, die zum Job geh�rt. Diese ist noch nicht initialisiert, es m�ssen also
     * noch connect() und sp�ter disconnect() aufgerufen werden.
     * @throws Exception
     */
    public static SOSConnection getJobConnection(SOSConnection connection, String spoolerId, String jobName, SOSLogger log) throws Exception{
      SOSConnection localConnection;
      String connectionName = "";
      HashMap result = null;
      if (log==null) log=new SOSStandardLogger(SOSLogger.INFO);
     
      if (connectionName == null || connectionName.length() == 0) {
View Full Code Here

     * noch connect() und sp�ter disconnect() aufgerufen werden.
     * @throws Exception
     */   
    public static SOSConnection getOrderConnection(SOSConnection connection, String spoolerId, String jobChain, String order, String databaseConnection, SOSLogger log) throws Exception{

        SOSConnection localConnection;
      String connectionName = "";
      String jobChainModel = "";
      HashMap result = null;
     
      if (log==null) log=new SOSStandardLogger(SOSLogger.INFO);
View Full Code Here

        String dbProperty = schedulerSettings.getSection("spooler").getProperty("db").replaceAll("jdbc:", "-url=jdbc:");
        dbProperty = dbProperty.substring(dbProperty.indexOf('-'));
        if (dbProperty.endsWith("-password=")) dbProperty=dbProperty.substring(0, dbProperty.length()-10);
        SOSArguments arguments = new SOSArguments(dbProperty);

        SOSConnection conn;
        if (log!=null){
            conn = SOSConnection.createInstance
                                            schedulerSettings.getSection("spooler").getProperty("db_class"),
                                            arguments.as_string("-class=", ""),
                                            arguments.as_string("-url=", ""),
View Full Code Here

    String dbProperty = props.getProperty("db").replaceAll("jdbc:", "-url=jdbc:");
    dbProperty = dbProperty.substring(dbProperty.indexOf('-'));
   
    SOSArguments dbArguments = new SOSArguments(dbProperty);

    SOSConnection conn =  SOSConnection.createInstance
                   props.getProperty("db_class"),
                   dbArguments.as_string("-class=", ""),
                   dbArguments.as_string("-url=", ""),
                   dbArguments.as_string("-user=", ""),
                   dbArguments.as_string("-password=", ""),
View Full Code Here

 
 
 
 
  private SOSConnection getConnections(String settingsfile) throws Exception{
    SOSConnection conn = null;
    if(sosString.parseToString(settingsfile).length() > 0) {     
      conn = getConnectionFromINIFile(settingsfile);
    }
   
    if (conn == null) {
View Full Code Here

   
    return conn;
  }
 
  private SOSConnection getConnectionFromINIFile(String settingsfile) throws Exception{
    SOSConnection conn = null;
    try {
     
      spooler_log.debug3("DB Connecting.. .");
      conn = SOSConnection.createInstance(settingsfile, new sos.util.SOSSchedulerLogger(spooler_log));
     
      conn.connect();
      spooler_log.debug3("DB Connected");
    } catch (Exception e) {
      throw (new Exception("error in " + SOSClassUtil.getMethodName()
          + ": connect to database failed: " + e.toString()));
    }
View Full Code Here

    }
   
  }
 
  private SOSConnection getConnections(String settingsfile) throws Exception{
    SOSConnection conn = null;
    if(sosString.parseToString(settingsfile).length() > 0) {     
      conn = getConnectionFromINIFile(settingsfile);
    }
   
    if (conn == null) {
View Full Code Here

TOP

Related Classes of sos.connection.SOSConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.