Examples of ImmediateValue


Examples of org.jboss.msc.value.ImmediateValue

                        //we need a newURI every time
                        bindingConfiguration = new BindingConfiguration(name, new FixedInjectionSource(new ManagedReferenceFactory() {
                            @Override
                            public ManagedReference getReference() {
                                try {
                                    return new ValueManagedReference(new ImmediateValue(new URI(resourceRef.getResUrl())));
                                } catch (URISyntaxException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }, new URI(resourceRef.getResUrl())));
                    } catch (URISyntaxException e) {
                        throw MESSAGES.cannotParseResourceRefUri(e, resourceRef.getResUrl());
                    }
                } else {
                    try {
                        bindingConfiguration = new BindingConfiguration(name, new FixedInjectionSource(new ManagedReferenceFactory() {
                            @Override
                            public ManagedReference getReference() {
                                try {
                                    return new ValueManagedReference(new ImmediateValue(new URL(resourceRef.getResUrl())));
                                } catch (MalformedURLException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }, new URL(resourceRef.getResUrl())));
View Full Code Here

Examples of org.jboss.msc.value.ImmediateValue

    }

    @Override
    public ManagedReference createViewInstance(final ComponentView componentView, final Map<Object, Object> contextData) {
        Object value = EJBClient.createProxy(new EJBHomeLocator(componentView.getViewClass(), applicationName, moduleName, beanName, distinctName));
        return new ValueManagedReference(new ImmediateValue(value));
    }
View Full Code Here

Examples of org.jboss.msc.value.ImmediateValue

    }

    @Override
    public ManagedReference createViewInstance(final ComponentView componentView, final Map<Object, Object> contextData) {
        Object value = EJBClient.createProxy(new StatelessEJBLocator(componentView.getViewClass(), applicationName, moduleName, beanName, distinctName));
        return new ValueManagedReference(new ImmediateValue(value));
    }
View Full Code Here

Examples of org.jboss.msc.value.ImmediateValue

                .install();


        final ServiceName handleDelegateServiceName = contextServiceName.append("HandleDelegate");
        final BinderService handleDelegateBindingService = new BinderService("HandleDelegate");
        handleDelegateBindingService.getManagedObjectInjector().inject(new ValueManagedReferenceFactory(new ImmediateValue(new HandleDelegateImpl(module.getClassLoader()))));
        serviceTarget.addService(handleDelegateServiceName, handleDelegateBindingService)
                .addDependency(contextServiceName, ServiceBasedNamingStore.class, handleDelegateBindingService.getNamingStoreInjector())
                .install();

    }
View Full Code Here

Examples of org.jboss.msc.value.ImmediateValue

        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

Examples of org.jboss.msc.value.ImmediateValue

        if (existingService != null) {
            context.removeService(existingService);
        }

        if (enabled.isDefined()) {
            final Service<Boolean> newDefaultPoolConfigService = new ValueService<Boolean>(new ImmediateValue(enabled.asBoolean()));
            ServiceController<?> newController =
                context.getServiceTarget().addService(SERVICE_NAME, newDefaultPoolConfigService)
                    .install();
            if (newControllers != null) {
                newControllers.add(newController);
View Full Code Here

Examples of org.jboss.msc.value.ImmediateValue

            } catch (Exception e) {
                throw MESSAGES.failToCreateStatefulSessionBean(beanName,e);
            }
        }
        Object value = EJBClient.createProxy(new StatefulEJBLocator(componentView.getViewClass(), applicationName, moduleName, beanName, distinctName, sessionID));
        return new ValueManagedReference(new ImmediateValue(value));
    }
View Full Code Here

Examples of org.jboss.msc.value.ImmediateValue

        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

Examples of org.jboss.msc.value.ImmediateValue

        if (existingService != null) {
            context.removeService(existingService);
        }

        if (enabled.isDefined()) {
            final Service<Boolean> newDefaultPoolConfigService = new ValueService<Boolean>(new ImmediateValue(enabled.asBoolean()));
            ServiceController<?> newController =
                context.getServiceTarget().addService(SERVICE_NAME, newDefaultPoolConfigService)
                    .install();
            if (newControllers != null) {
                newControllers.add(newController);
View Full Code Here

Examples of org.jboss.msc.value.ImmediateValue

            if (owner instanceof ServiceName && binderService instanceof SharedBinderService) {
                final ServiceName deploymentUnitServiceName = (ServiceName) owner;
                final RuntimeBindReleaseService.References duBindingReferences = (RuntimeBindReleaseService.References) controller.getServiceContainer().getService(JndiNamingDependencyProcessor.serviceName(deploymentUnitServiceName)).getValue();
                duBindingReferences.acquire(((SharedBinderService) binderService));
            }
            binderService.getManagedObjectInjector().setValue(new ImmediateValue(new ImmediateManagedReferenceFactory(object)));
        }
    }
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.