Examples of EZBServer


Examples of org.ow2.easybeans.api.EZBServer

     */
    public void start() throws EZBComponentException {
        // get server from the config

        // TODO: Change this to an event
        EZBServer server = EmbeddedManager.getEmbedded(0);

        // Build Remote Object for this server.
        try {
            jndiResolver = new JNDIResolverRemoteImpl(server);
        } catch (RemoteException e) {
View Full Code Here

Examples of org.ow2.easybeans.api.EZBServer

     * {@inheritDoc}
     */
    public String getAdditionnalProperties(final EZBContainer instance) {
        StringBuilder sb = new StringBuilder();
        // J2EEServer=?
        EZBServer server = instance.getConfiguration().getEZBServer();
        String parent = null;
        try {
            parent = MBeansHelper.getInstance().getObjectName(server);
            sb.append(getParentNameProperty(parent));

View Full Code Here

Examples of org.ow2.easybeans.api.EZBServer

    /**
     * Initialize the factory object with the given infos.
     */
    private void initFactory() {
        // Get Embedded server
        EZBServer ejb3Server = EmbeddedManager.getEmbedded(this.embeddedID);
        if (ejb3Server == null) {
            throw new IllegalStateException("Cannot find the server with id '" + this.embeddedID + "'.");
        }

        // Get the container
        EZBContainer container = ejb3Server.getContainer(getContainerId());
        if (container == null) {
            throw new IllegalStateException("Cannot find the container with id '" + getContainerId() + "'.");
        }

        this.factory = container.getFactory(getFactoryName());
View Full Code Here

Examples of org.ow2.easybeans.api.EZBServer

        Integer easyBeansServerID = easyBeansJobDetailData.getEasyBeansServerID();
        String containerID = easyBeansJobDetailData.getContainerId();
        String factoryName = easyBeansJobDetailData.getFactoryName();

        // Get the EasyBeans embedded instance
        EZBServer embedded = EmbeddedManager.getEmbedded(easyBeansServerID);

        // Get the container object
        EZBContainer container = embedded.getContainer(containerID);
        // get the factory
        Factory<?, ?> factory = container.getFactory(factoryName);

        // Ensure operation state is valid
        OperationState operationState = factory.getOperationState();
        if (DEPENDENCY_INJECTION == operationState || LIFECYCLE_CALLBACK_INTERCEPTOR == operationState
                || AFTER_COMPLETION == operationState) {
            throw new IllegalStateException("The getTimer() method cannot be called within the operation state '"
                    + operationState + "'.");
        }

        // Get the components registry
        EZBComponentRegistry registry = embedded.getComponentManager().getComponentRegistry();

        // Get the timer components
        List<TimerComponent> timerComponents = registry.getComponents(TimerComponent.class);

        // Find the quartz component in this list
View Full Code Here

Examples of org.ow2.easybeans.api.EZBServer

        // Get the Job Detail data from the context
        EasyBeansJobDetailData data = ((EasyBeansJobDetail) context.getJobDetail()).getJobDetailData();


        // Find the Embedded instance
        EZBServer server = EmbeddedManager.getEmbedded(data.getEasyBeansServerID());
        if (server == null) {
            throw new JobExecutionException("Cannot find the embedded server with the id '" + data.getEasyBeansServerID() + "'.");
        }

        // Get the container
        EZBContainer container = server.getContainer(data.getContainerId());
        if (container == null) {
            throw new JobExecutionException("Cannot find the container with the id '" + data.getContainerId() + "'.");
        }

        // Get the factory
View Full Code Here

Examples of org.ow2.easybeans.api.EZBServer

    @SuppressWarnings("unchecked")
    public static <T> T getProxy(final Factory<?, ?> factory, final Class<T> interfaceClass, final boolean isLocalProxy) {

        // Get elements used to create a proxy
        EZBContainer container = factory.getContainer();
        EZBServer server = container.getConfiguration().getEZBServer();
        String containerID = container.getId();
        String factoryName = factory.getBeanInfo().getName();

        // If factory is a stateful factory, add the stateful flag
        boolean isStateful = false;
        if (factory instanceof StatefulSessionFactory) {
            isStateful = true;
        }
        Integer serverID = server.getID();

        // Build the handler
        AbsInvocationHandler handler = null;
        if (isLocalProxy) {
            // local handler
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.