Examples of ValueManagedReference


Examples of org.jboss.as.naming.ValueManagedReference

     * @param instance The instance to wrap
     * @return The new ComponentInstance
     */
    public ComponentInstance createInstance(Object instance) {
        waitForComponentStart();
        BasicComponentInstance obj = constructComponentInstance(new ValueManagedReference(new ImmediateValue<Object>(instance)));
        return obj;
    }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

                ejbLocator = new StatelessEJBLocator(viewClass, appName, moduleName, beanName, distinctName);
            }
        }
        final Object proxy = EJBClient.createProxy(ejbLocator);

        return new ValueManagedReference(new ImmediateValue<Object>(proxy));
    }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

        return value != null ? value.getClass().getName() : ContextListManagedReferenceFactory.DEFAULT_INSTANCE_CLASS_NAME;
    }

    @Override
    public ManagedReference getReference() {
        return new ValueManagedReference(new ImmediateValue<Object>(service.getValue()));
    }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

    private final InjectedValue<DataSource> dataSourceValue = new InjectedValue<DataSource>();

    private ManagedReference reference;

    public synchronized void start(StartContext startContext) throws StartException {
        reference = new ValueManagedReference(new ImmediateValue<Object>(dataSourceValue.getValue()));
    }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

        } else {
            ejbLocator = new StatelessEJBLocator(viewClass, appName, moduleName, beanName, distinctName);
        }
        final Object proxy = EJBClient.createProxy(ejbLocator);

        return new ValueManagedReference(new ImmediateValue<Object>(proxy));
    }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

            final ConstructedValue interceptorInstanceValue = new ConstructedValue(interceptorConstructor, Collections.<Value<?>>emptyList());
            // we *don't* create multiple instances of the container-interceptor class, but we just reuse a single instance and it's *not*
            // tied to the EJB component instance lifecycle.
            final CachedValue cachedInterceptorInstanceValue = new CachedValue(interceptorInstanceValue);
            // ultimately create the managed reference which is backed by the CachedValue
            final ManagedReference interceptorInstanceRef = new ValueManagedReference(cachedInterceptorInstanceValue);
            // return the ContainerInterceptorMethodInterceptorFactory which is responsible for creating an Interceptor
            // which can invoke the container-interceptor's around-invoke/around-timeout methods
            return new ContainerInterceptorMethodInterceptorFactory(interceptorInstanceRef, method);
        }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

    private final InjectedValue<Referenceable> refValue = new InjectedValue<Referenceable>();

    private ManagedReference reference;

    public synchronized void start(StartContext startContext) throws StartException {
        reference = new ValueManagedReference(new ImmediateValue<Object>(refValue.getValue()));
    }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

            statefulEJBLocator = EJBClient.createSession(componentView.getViewClass(), applicationName, moduleName, beanName, distinctName);
        } else {
            statefulEJBLocator = new StatefulEJBLocator(componentView.getViewClass(), applicationName, moduleName, beanName, distinctName, sessionID, statefulSessionComponent.getCache().getStrictAffinity(), WildFlySecurityManager.getPropertyPrivileged(ServerEnvironment.NODE_NAME, null));
        }
        final Object ejbProxy = EJBClient.createProxy(statefulEJBLocator);
        return new ValueManagedReference(new ImmediateValue(ejbProxy));
    }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

        public ManagedReference getReference() {
            BeanManager bm = beanManager.getOptionalValue();
            if (bm == null) {
                return null;
            }
            return new ValueManagedReference(new ImmediateValue<Object>(bm));
        }
View Full Code Here

Examples of org.jboss.as.naming.ValueManagedReference

        Object primaryKey = contextData.get(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
        if (primaryKey == null) {
            primaryKey = invokeCreate(componentView.getComponent(), contextData);
        }
        Object value = EJBClient.createProxy(new EntityEJBLocator(componentView.getViewClass(), applicationName, moduleName, beanName, distinctName, primaryKey));
        return new ValueManagedReference(new ImmediateValue(value));
    }
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.