Package org.jboss.as.ee.component

Examples of org.jboss.as.ee.component.Component.createInstance()


    }

    public Object processInvocation(final InterceptorContext context) throws Exception {
        final AtomicReference<ComponentInstance> componentInstanceReference = this.componentInstanceReference;
        final Component component = context.getPrivateData(Component.class);
        final ComponentInstance componentInstance = component.createInstance();
        boolean ok = false;
        try {
            context.putPrivateData(ComponentInstance.class, componentInstance);
            componentInstanceReference.set(componentInstance);
            final Object result = context.proceed();
View Full Code Here


    }

    public Object processInvocation(final InterceptorContext context) throws Exception {
        final AtomicReference<ComponentInstance> componentInstanceReference = this.componentInstanceReference;
        final Component component = context.getPrivateData(Component.class);
        final ComponentInstance componentInstance = component.createInstance();
        boolean ok = false;
        try {
            context.putPrivateData(ComponentInstance.class, componentInstance);
            componentInstanceReference.set(componentInstance);
            final Object result = context.proceed();
View Full Code Here

    public static final InterceptorFactory FACTORY = new ImmediateInterceptorFactory(new ManagedBeanCreateInterceptor());

    public Object processInvocation(final InterceptorContext context) throws Exception {
        final ComponentClientInstance instance = context.getPrivateData(ComponentClientInstance.class);
        final Component component = context.getPrivateData(Component.class);
        final ComponentInstance componentInstance = component.createInstance();
        boolean ok = false;
        try {
            context.putPrivateData(ComponentInstance.class, componentInstance);
            instance.setViewInstanceData(ComponentInstance.class, componentInstance);
            final Object result = context.proceed();
View Full Code Here

        Component component = context.getPrivateData(Component.class);
        if (component == null) {
            throw new IllegalStateException("Component not set in InterceptorContext: " + context);
        }
        // TODO: should be getInstance()
        ComponentInstance componentInstance = component.createInstance();
        // add it to the interceptor context
        context.putPrivateData(ComponentInstance.class, componentInstance);

        // proceed
        return context.proceed();
View Full Code Here

            XBundle bundle = injectedBundle.getValue();
            Deployment deployment = depUnit.getAttachment(OSGiConstants.DEPLOYMENT_KEY);
            BundleManager bundleManager = depUnit.getAttachment(OSGiConstants.BUNDLE_MANAGER_KEY);
            Component activatorComponent = injectedComponent.getOptionalValue();
            if (activatorComponent != null && deployment.getAttachment(BundleActivator.class) == null) {
                ComponentInstance componentInstance = activatorComponent.createInstance();
                BundleActivator instance = (BundleActivator) componentInstance.getInstance();
                deployment.addAttachment(BundleActivator.class, instance);
            }
            OperationAssociation.INSTANCE.setAssociation(new ModelNode("deploy"));
            try {
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.