Package org.jboss.as.naming

Examples of org.jboss.as.naming.ContextListAndJndiViewManagedReferenceFactory


        final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(name);

        final Hashtable<String, String> environment = getObjectFactoryEnvironment(context, model);

        final BinderService binderService = new BinderService(name, objectFactoryClassInstance);
        binderService.getManagedObjectInjector().inject(new ContextListAndJndiViewManagedReferenceFactory() {
            @Override
            public ManagedReference getReference() {
                try {
                    final Object value = objectFactoryClassInstance.getObjectInstance(name, null, null, environment);
                    return new ImmediateManagedReference(value);
View Full Code Here


        environment.put(ExternalContextObjectFactory.CACHE_CONTEXT, Boolean.toString(cache));
        environment.put(ExternalContextObjectFactory.INITIAL_CONTEXT_CLASS, className);
        environment.put(ExternalContextObjectFactory.INITIAL_CONTEXT_MODULE, moduleID);

        final ExternalContextBinderService binderService = new ExternalContextBinderService(name, objectFactoryClassInstance);
        binderService.getManagedObjectInjector().inject(new ContextListAndJndiViewManagedReferenceFactory() {
            @Override
            public ManagedReference getReference() {
                try {
                    final Object value = objectFactoryClassInstance.getObjectInstance(name, null, null, environment);
                    return new ImmediateManagedReference(value);
View Full Code Here

        final ServiceTarget serviceTarget = context.getServiceTarget();
        final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(name);

        final BinderService binderService = new BinderService(name);
        binderService.getManagedObjectInjector().inject(new ContextListAndJndiViewManagedReferenceFactory() {
            @Override
            public ManagedReference getReference() {
                try {
                    final Object value = new InitialContext().lookup(lookup);
                    return new ImmediateManagedReference(value);
View Full Code Here

        MessagingXmlInstallDeploymentUnitProcessor.createDeploymentSubModel(registration, deploymentUnit);
        JMSTopicConfigurationRuntimeHandler.INSTANCE.registerResource(getHornetQServerName(), topicName, destination);
    }

    private <D extends Destination> void inject(ServiceBuilder<?> serviceBuilder, Injector<ManagedReferenceFactory> injector, Service<D> destinationService) {
        final ContextListAndJndiViewManagedReferenceFactory referenceFactoryService = new MessagingJMSDestinationManagedReferenceFactory(destinationService);
        serviceBuilder.addInjection(injector, referenceFactoryService)
                .addListener(new AbstractServiceListener<Object>() {
                    public void transition(final ServiceController<? extends Object> controller, final ServiceController.Transition transition) {
                        switch (transition) {
                            case STARTING_to_UP: {
View Full Code Here

        final ManagedReferenceFactory value = super.getValue();
        if (value == null) {
            return null;
        }
        // wrap the real factory in the one that controls access
        return new ContextListAndJndiViewManagedReferenceFactory() {

            @Override
            public String getJndiViewInstanceValue() {
                return UserTransaction.class.getSimpleName();
            }
View Full Code Here

            if (server.getOutgoingSocketBinding()!=null){
                addOutboundSocketDependency(service, mailSessionBuilder, server);
            }
        }

        final ManagedReferenceFactory valueManagedReferenceFactory = new ContextListAndJndiViewManagedReferenceFactory() {

            @Override
            public String getJndiViewInstanceValue() {
                return String.valueOf(getReference().getInstance());
            }
View Full Code Here

        final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(name);

        final Hashtable<String, String> environment = getObjectFactoryEnvironment(context, model);

        final BinderService binderService = new BinderService(name, objectFactoryClassInstance);
        binderService.getManagedObjectInjector().inject(new ContextListAndJndiViewManagedReferenceFactory() {
            @Override
            public ManagedReference getReference() {
                try {
                    final Object value = objectFactoryClassInstance.getObjectInstance(name, null, null, environment);
                    return new ValueManagedReference(new ImmediateValue<Object>(value));
View Full Code Here

        final ServiceTarget serviceTarget = context.getServiceTarget();
        final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(name);

        final BinderService binderService = new BinderService(name);
        binderService.getManagedObjectInjector().inject(new ContextListAndJndiViewManagedReferenceFactory() {
            @Override
            public ManagedReference getReference() {
                try {
                    final Object value = new InitialContext().lookup(lookup);
                    return new ValueManagedReference(new ImmediateValue<Object>(value));
View Full Code Here

TOP

Related Classes of org.jboss.as.naming.ContextListAndJndiViewManagedReferenceFactory

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.