Examples of rebind()


Examples of javax.naming.Context.rebind()


                // Deploy EJB 2.1 on JOnAS service
                Context ctx = new ContextImpl(earURL.toExternalForm());
                try {
                    ctx.rebind("earUrl", earURL);
                    ctx.rebind("earRootUrl", earURL);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the EAR URL parameter '" + earURL + "'", e);
                }
View Full Code Here

Examples of javax.naming.Context.rebind()

                // Deploy EJB 2.1 on JOnAS service
                Context ctx = new ContextImpl(earURL.toExternalForm());
                try {
                    ctx.rebind("earUrl", earURL);
                    ctx.rebind("earRootUrl", earURL);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the EAR URL parameter '" + earURL + "'", e);
                }

                try {
View Full Code Here

Examples of javax.naming.Context.rebind()

                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the EAR URL parameter '" + earURL + "'", e);
                }

                try {
                    ctx.rebind("jarURLs", urls.toArray(new URL[urls.size()]));
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the urls parameter '" + urls + "'", e);
                }
                try {
                    ctx.rebind("earClassLoader", earClassLoader);
View Full Code Here

Examples of javax.naming.Context.rebind()

                    ctx.rebind("jarURLs", urls.toArray(new URL[urls.size()]));
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the urls parameter '" + urls + "'", e);
                }
                try {
                    ctx.rebind("earClassLoader", earClassLoader);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the earClassLoader parameter '" + earClassLoader + "'", e);
                }

                // Bind the EJB classloader
View Full Code Here

Examples of javax.naming.Context.rebind()

                    throw new DeployerException("Cannot add the earClassLoader parameter '" + earClassLoader + "'", e);
                }

                // Bind the EJB classloader
                try {
                    ctx.rebind("ejbClassLoader", ejbClassLoader);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the ejbClassLoader parameter '" + ejbClassLoader + "'", e);
                }

                // Role names
View Full Code Here

Examples of javax.naming.Context.rebind()

                    throw new DeployerException("Cannot add the ejbClassLoader parameter '" + ejbClassLoader + "'", e);
                }

                // Role names
                try {
                    ctx.rebind("roleNames", new String[0]);
                } catch (NamingException e) {
                    throw new DeployerException("Cannot add the altDDs parameter.'", e);
                }

                try {
View Full Code Here

Examples of javax.naming.Context.rebind()

                PersistenceContextType type = binding.getValue().getType();
                EntityManager em = persistenceUnitManager.getEntityManager(unitName, type);

                try {
                    createSubcontexts(envCtx, encName);
                    envCtx.rebind(encName, em);
                    if (this.logger.isDebugEnabled()) {
                        this.logger.debug("Adding persistence-context 'java:comp/env/" + encName + "'");
                    }
                } catch (NamingException e) {
                    this.logger.error("Unable to bind persistence-context in ENC", e);
View Full Code Here

Examples of javax.naming.Context.rebind()

                String unitName = binding.getValue().getUnitName();
                EntityManagerFactory emf = persistenceUnitManager.getEntityManagerFactory(unitName);

                try {
                    createSubcontexts(envCtx, encName);
                    envCtx.rebind(encName, emf);
                    if (this.logger.isDebugEnabled()) {
                        this.logger.debug("Adding persistence-unit 'java:comp/env/" + encName + "'");
                    }
                } catch (NamingException e) {
                    this.logger.error("Unable to bind persistence-unit in ENC", e);
View Full Code Here

Examples of javax.naming.Context.rebind()

                        jndiName = jndiResolver.getEJBJNDIUniqueName(interfaceName, beanName);

                        // Bind a link to this JNDI name
                        try {
                            createSubcontexts(envCtx, encName);
                            envCtx.rebind(encName, new LinkRef(jndiName));
                            if (this.logger.isDebugEnabled()) {
                                this.logger.debug("Adding ejb 'java:comp/env/" + encName + "' from JNDIName '" + jndiName
                                        + "'.");
                            }
                        } catch (NamingException e) {
View Full Code Here

Examples of javax.naming.Context.rebind()

            } catch (NamingException e) {
                logger.error("Cannot lookup UserTransaction.", e);
            }
        }
        if (this.userTransaction != null) {
            compCtx.rebind("UserTransaction", this.userTransaction);
        }

        // bind ORB
        try {
            compCtx.rebind("ORB", ORBInitHelper.getORB());
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.