Package org.apache.derby.iapi.services.loader

Examples of org.apache.derby.iapi.services.loader.ClassFactoryContext


         String...  optionalArgs
         )
        throws SQLException
    {
        try {
      ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContext( ClassFactoryContext.CONTEXT_ID );
            ClassFactory    classFactory = cfc.getClassFactory();

            String              toolClassName = findToolClassName( toolName, optionalArgs );           
            OptionalTool    tool = null;

            Class<?> toolClass;
View Full Code Here


    }

    ClassFactory getClassFactory() {
    if (cf == null) {

      ClassFactoryContext cfc =
        (ClassFactoryContext) ContextService.getContextOrNull
                                          (ClassFactoryContext.CONTEXT_ID);

      if (cfc != null)
        cf = cfc.getClassFactory();
    }
    return cf;
  }
View Full Code Here

    throws StandardException {

    if (lf == null)
      return false;

    ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContextOrNull(ClassFactoryContext.CONTEXT_ID);

    // This method can be called from outside of the database
    // engine, in which case tc will be null. In that case
    // we lock the class loader only for the duration of
    // the loadClass().
    CompatibilitySpace lockSpace = null;
   
    if (cfc != null) {
      lockSpace = cfc.getLockSpace();
    }
    if (lockSpace == null)
      lockSpace = compat;

    Object lockGroup = lockSpace.getOwner();
View Full Code Here


  private String getClasspath()
    throws StandardException {

    ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContextOrNull(ClassFactoryContext.CONTEXT_ID);

    PersistentSet ps = cfc.getPersistentSet();
   
    String classpath = PropertyUtil.getServiceProperty(ps, Property.DATABASE_CLASSPATH);

    //
    //In per database mode we must always have a classpath. If we do not
View Full Code Here

  }

  JarReader getJarReader() {
    if (jarReader == null) {

      ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContextOrNull(ClassFactoryContext.CONTEXT_ID);

      jarReader = cfc.getJarReader();
    }
    return jarReader;
  }
View Full Code Here

            { throw wrap( MessageService.getTextMessage( SQLState.LANG_BAD_OPTIONAL_TOOL_ARGS ) ); }

            String  customOptTraceName = configurationParameters[ 1 ];

            try {
                ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContext( ClassFactoryContext.CONTEXT_ID );
                ClassFactory    classFactory = cfc.getClassFactory();

                tracer = (OptTrace) classFactory.loadApplicationClass( customOptTraceName ).newInstance();
            }
            catch (InstantiationException cnfe) { throw cantInstantiate( customOptTraceName ); }
            catch (ClassNotFoundException cnfe) { throw cantInstantiate( customOptTraceName ); }
View Full Code Here


    ClassFactory getClassFactory() {
    if (cf == null) {

      ClassFactoryContext cfc =
        (ClassFactoryContext) ContextService.getContextOrNull
                                          (ClassFactoryContext.CONTEXT_ID);

      if (cfc != null)
        cf = cfc.getClassFactory();
    }
    return cf;
  }
View Full Code Here


    ClassFactory getClassFactory() {
    if (cf == null) {

      ClassFactoryContext cfc =
        (ClassFactoryContext) ContextService.getContextOrNull
                                          (ClassFactoryContext.CONTEXT_ID);

      if (cfc != null)
        cf = cfc.getClassFactory();
    }
    return cf;
  }
View Full Code Here

    throws StandardException {

    if (lf == null)
      return false;

    ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContextOrNull(ClassFactoryContext.CONTEXT_ID);

    // This method can be called from outside of the database
    // engine, in which case tc will be null. In that case
    // we lock the class loader only for the duration of
    // the loadClass().
    CompatibilitySpace lockSpace = null;
   
    if (cfc != null) {
      lockSpace = cfc.getLockSpace();
    }
    if (lockSpace == null)
      lockSpace = compat;

    Object lockGroup = lockSpace.getOwner();
View Full Code Here


  private String getClasspath()
    throws StandardException {

    ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContextOrNull(ClassFactoryContext.CONTEXT_ID);

    PersistentSet ps = cfc.getPersistentSet();
   
    String classpath = PropertyUtil.getServiceProperty(ps, Property.DATABASE_CLASSPATH);

    //
    //In per database mode we must always have a classpath. If we do not
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.loader.ClassFactoryContext

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.