Package com.sun.jdo.api.persistence.support

Examples of com.sun.jdo.api.persistence.support.SpecialDBOperation


     * @return An instance of SpecialDBOperation specified by specialDBOpClassName.
     */
    private SpecialDBOperation newSpecialDBOperationInstance(
        final String specialDBOpClassName, DatabaseMetaData databaseMetaData,
        String identifier) {
        SpecialDBOperation retInstance = null;
        if (specialDBOpClassName != null) {
            final ClassLoader loader = DBVendorType.class.getClassLoader();
            Class clz = (Class)java.security.AccessController.doPrivileged(
                new java.security.PrivilegedAction() {
                    public Object run() {
                        try {
                            if (loader != null) {
                                return Class.forName(specialDBOpClassName,
                                    true, loader);
                            } else {
                                return Class.forName(specialDBOpClassName);
                            }
                        } catch(Exception ex) {
                            if (logger.isLoggable()) {
                                logger.log(Logger.INFO,
                                    "core.configuration.cantloadclass", // NOI18N
                                    specialDBOpClassName);
                            }
                            return null;
                        }
                    }
                }
            );

            if (clz != null) {
                try {
                    retInstance = (SpecialDBOperation)clz.newInstance();
                    retInstance.initialize(databaseMetaData, identifier);
                } catch(Exception ex) {
                    throw new JDOFatalUserException(
                        I18NHelper.getMessage(messages,
                        "sqlstore.database.dbvendor.cantinstantiateclass", // NOI18N
                        specialDBOpClassName), ex);
View Full Code Here


     * @return An instance of SpecialDBOperation specified by specialDBOpClassName.
     */
    private SpecialDBOperation newSpecialDBOperationInstance(
        final String specialDBOpClassName, DatabaseMetaData databaseMetaData,
        String identifier) {
        SpecialDBOperation retInstance = null;
        if (specialDBOpClassName != null) {
            final ClassLoader loader = DBVendorType.class.getClassLoader();
            Class clz = (Class)java.security.AccessController.doPrivileged(
                new java.security.PrivilegedAction() {
                    public Object run() {
                        try {
                            if (loader != null) {
                                return Class.forName(specialDBOpClassName,
                                    true, loader);
                            } else {
                                return Class.forName(specialDBOpClassName);
                            }
                        } catch(Exception ex) {
                            if (logger.isLoggable()) {
                                logger.log(Logger.INFO,
                                    "core.configuration.cantloadclass", // NOI18N
                                    specialDBOpClassName);
                            }
                            return null;
                        }
                    }
                }
            );

            if (clz != null) {
                try {
                    retInstance = (SpecialDBOperation)clz.newInstance();
                    retInstance.initialize(databaseMetaData, identifier);
                } catch(Exception ex) {
                    throw new JDOFatalUserException(
                        I18NHelper.getMessage(messages,
                        "sqlstore.database.dbvendor.cantinstantiateclass", // NOI18N
                        specialDBOpClassName), ex);
View Full Code Here

TOP

Related Classes of com.sun.jdo.api.persistence.support.SpecialDBOperation

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.