Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.ResourceRef$JAXB


            IO.close(inputStream);
        }
    }

    public static void marshal(FacesConfig facesConfig, OutputStream outputStream) throws Exception {
        Sxc.marshal(new FacesConfig$JAXB(), facesConfig, new StreamResult(outputStream));
    }
View Full Code Here


* @version $Rev$ $Date$
*/
public class HandlerChainsXml {

    public static HandlerChains unmarshal(final InputStream inputStream) throws Exception {
        return Sxc.unmarshalJavaee(new HandlerChains$JAXB(), inputStream);
    }
View Full Code Here

        try {
            final XMLStreamReader filter = Sxc.prepareReader(inputStream);
            synchronized (Adapters.handlerChainsStringQNameAdapterAdapter) { // few threads on it so synchronized > lock
                Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(filter.getNamespaceContext());
                try {
                    return Sxc.unmarhsal(new HandlerChains$JAXB(), new XoXMLStreamReaderImpl(filter));
                } finally {
                    Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(null);
                }
            }
        } finally {
View Full Code Here

            IO.close(inputStream);
        }
    }

    public static void marshal(final HandlerChains handlerChains, final OutputStream outputStream) throws Exception {
        Sxc.marshal(new HandlerChains$JAXB(), handlerChains, new StreamResult(outputStream));
    }
View Full Code Here

* @version $Rev$ $Date$
*/
public class HandlerChainsXml {

    public static HandlerChains unmarshal(final InputStream inputStream) throws Exception {
        return Sxc.unmarshalJavaee(new HandlerChains$JAXB(), inputStream);
    }
View Full Code Here

        try {
            final XMLStreamReader filter = Sxc.prepareReader(inputStream);
            synchronized (Adapters.handlerChainsStringQNameAdapterAdapter) { // few threads on it so synchronized > lock
                Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(filter.getNamespaceContext());
                try {
                    return Sxc.unmarhsal(new HandlerChains$JAXB(), new XoXMLStreamReaderImpl(filter));
                } finally {
                    Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(null);
                }
            }
        } finally {
View Full Code Here

            IO.close(inputStream);
        }
    }

    public static void marshal(final HandlerChains handlerChains, final OutputStream outputStream) throws Exception {
        Sxc.marshal(new HandlerChains$JAXB(), handlerChains, new StreamResult(outputStream));
    }
View Full Code Here

                            resourceEnvRef.setResourceEnvRefType(member.getType().getName());
                        }
                    }
                    reference = resourceEnvRef;
                } else if (!knownEnvironmentEntries.contains(type)) {
                    ResourceRef resourceRef = consumer.getResourceRefMap().get(refName);

                    if (resourceRef == null) {
                        resourceRef = new ResourceRef();
                        resourceRef.setName(refName);
                        consumer.getResourceRef().add(resourceRef);
                    }

                    if (resourceRef.getResAuth() == null) {
                        if (resource.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            resourceRef.setResAuth(ResAuth.APPLICATION);
                        } else {
                            resourceRef.setResAuth(ResAuth.CONTAINER);
                        }
                    }

                    if (resourceRef.getResType() == null || ("").equals(resourceRef.getResType())) {
                        if (resource.type() != java.lang.Object.class) {
                            resourceRef.setResType(resource.type().getName());
                        } else {
                            resourceRef.setResType(member.getType().getName());
                        }
                    }

                    if (resourceRef.getResSharingScope() == null) {
                        if (resource.shareable()) {
                            resourceRef.setResSharingScope(ResSharingScope.SHAREABLE);
                        } else {
                            resourceRef.setResSharingScope(ResSharingScope.UNSHAREABLE);
                        }
                    }
                    reference = resourceRef;
                }
            }
View Full Code Here

                buildDataSourceDefinition(consumer, definition);
            }
        }

        private void buildContext(JndiConsumer consumer, Member member) {
            ResourceRef ref = new ResourceRef();
            ref.setName(member.getDeclaringClass().getName() + "/" + member.getName());

            InjectionTarget target = new InjectionTarget();
            target.setInjectionTargetClass(member.getDeclaringClass().getName());
            target.setInjectionTargetName(member.getName());
            ref.getInjectionTarget().add(target);

            consumer.getResourceRef().add(ref);
        }
View Full Code Here

                    }
                } else {
                    /*
                     * @Resource <resource-ref>
                     */
                    ResourceRef resourceRef = consumer.getResourceRefMap().get(refName);

                    if (resourceRef == null) {
                        resourceRef = new ResourceRef();
                        resourceRef.setName(refName);
                        consumer.getResourceRef().add(resourceRef);
                    }

                    if (resourceRef.getResAuth() == null) {
                        if (resource.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            resourceRef.setResAuth(ResAuth.APPLICATION);
                        } else {
                            resourceRef.setResAuth(ResAuth.CONTAINER);
                        }
                    }

                    if (resourceRef.getResType() == null || ("").equals(resourceRef.getResType())) {
                        resourceRef.setResType(type.getName());
                    }

                    if (resourceRef.getResSharingScope() == null) {
                        if (resource.shareable()) {
                            resourceRef.setResSharingScope(ResSharingScope.SHAREABLE);
                        } else {
                            resourceRef.setResSharingScope(ResSharingScope.UNSHAREABLE);
                        }
                    }
                    reference = resourceRef;
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.ResourceRef$JAXB

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.