Package org.apache.openejb

Examples of org.apache.openejb.OpenEJBRuntimeException


                LOGGER.log(Level.SEVERE, "Can't inject in " + testInstance.getClass(), t);
                if (t instanceof RuntimeException) {
                    throw (RuntimeException) t;
                }
                if (t instanceof Exception) {
                    throw new OpenEJBRuntimeException((Exception) t);
                }
                // ignoring other cases for the moment, let manage some OWB API change without making all tests failing
            }
        }
View Full Code Here


        final Properties properties = new Properties();
        final ByteArrayInputStream bais = new ByteArrayInputStream(getProperties().getBytes());
        try {
            properties.load(bais);
        } catch (final IOException e) {
            throw new OpenEJBRuntimeException(e);
        } finally {
            try {
                IO.close(bais);
            } catch (final IOException ignored) {
                // no-op
View Full Code Here

            if (server.isRegistered(objectName)) {
                server.unregisterMBean(objectName);
            }
            server.registerMBean(this, objectName);
        } catch (final Exception e) {
            throw new OpenEJBRuntimeException(e);
        }
    }
View Full Code Here

    public void unregister() {
        try {
            LocalMBeanServer.get().unregisterMBean(objectName);
        } catch (final Exception e) {
            throw new OpenEJBRuntimeException(e);
        }
    }
View Full Code Here

            try {
                toObject = objectClass.getMethod("valueOf", primitiveClass);
                toPrimitive = objectClass.getMethod(toPrimitiveMethodName);
            } catch (final NoSuchMethodException e) {
                throw new OpenEJBRuntimeException(e);
            }

            conversionsByPrimitive.put(primitiveClass, this);
        }
View Full Code Here

                final String prefix = info.properties.getProperty(TABLE_PREFIX);
                if (prefix != null) {
                    final String mapping = info.properties.getProperty(OPENJPA_METADATA_REPOSITORY);
                    if (mapping != null && !"org.apache.openjpa.jdbc.meta.MappingRepository".equals(mapping)) {
                        throw new OpenEJBRuntimeException("can't honor table prefixes since you provided a custom mapping repository: " + mapping);
                    }
                    info.properties.setProperty(OPENJPA_METADATA_REPOSITORY, PREFIX_METADATA_REPOSITORY + "(prefix=" + prefix + ")");
                    if (!info.properties.containsKey(OPENJPA_SEQUENCE)) {
                        info.properties.setProperty(OPENJPA_SEQUENCE, PREFIX_SEQUENCE + "(prefix=" + prefix + ")");
                    } else {
View Full Code Here

            this.fail = fail;
        }

        public void configureTest(final Object testObj) {
            if (fail) {
                throw new OpenEJBRuntimeException("Fail");
            }

            assertEquals(fakeTestObject, testObj);

            configuredInvoked = true;
View Full Code Here

                }
            }

            final Object instance = recipe.create(classloader);
            if (!filter.isInstance(instance)) {
                throw new OpenEJBRuntimeException(feature + " is not an abstract feature");
            }
            list.add(filter.cast(instance));
        }

        if (list.isEmpty()) {
View Full Code Here

        if (is == null && file != null && file.exists()) {
            uri = file.toURI();
            try {
                is = new FileInputStream(file);
            } catch (final FileNotFoundException e) {
                throw new OpenEJBRuntimeException("File was deleted! " + uriStr, e);
            }
            url = file.toURI().toURL();
        } else if (is == null) {
            tryClasspath(uriStr);
        }
View Full Code Here

            if (sei != null && sei.trim().length() != 0) {
                try {
                    final Class seiClass = clazz.getClassLoader().loadClass(sei.trim());
                    return getNameFromInterface(seiClass);
                } catch (final ClassNotFoundException e) {
                    throw new OpenEJBRuntimeException("Unable to load SEI class: " + sei, e);
                }
            }
            return getName(clazz, webService.name());
        }
View Full Code Here

TOP

Related Classes of org.apache.openejb.OpenEJBRuntimeException

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.