Package javax.naming

Examples of javax.naming.LinkRef


                JipletLogger.debug("Binding resource-ref"
                        + rsrc.getResRefName() + " to " + jndi_name
                        + " for the context " + context);
            }
            NamingUtil
                    .rebind(sub, rsrc.getResRefName(), new LinkRef(jndi_name));
        }
    }
View Full Code Here


            {
                JipletLogger.debug("Binding env-resource-ref"
                        + rsrc.getResourceEnvRefName() + " to " + jndi_name
                        + " for the context " + context);
            }
            NamingUtil.rebind(sub, rsrc.getResourceEnvRefName(), new LinkRef(
                    jndi_name));
        }
    }
View Full Code Here

    private static Object normalize(final Object value) {
        try {

            if (!(value instanceof LinkRef)) return value;

            final LinkRef ref = (LinkRef) value;

            final RefAddr refAddr = ref.getAll().nextElement();

            final String address = refAddr.getContent().toString();

            if (address.startsWith("openejb:")) return value;

            if (!address.startsWith("java:")) {
                return new LinkRef("java:" + address);
            }

        } catch (Exception e) {
        }
View Full Code Here

                    return obj;
                }
            }
        }
        if (result instanceof LinkRef) {
            LinkRef ref = (LinkRef)result;
            result = lookup(ref.getLinkName());
        }
        if (result instanceof Reference) {
            try {
                result = NamingManager.getObjectInstance(result, null, null, this.environment);
            } catch (NamingException e) {
View Full Code Here

                    return value;
                }
            }
        }
        if (result instanceof LinkRef) {
            LinkRef ref = (LinkRef)result;
            result = lookup(ref.getLinkName());
        }
        if (result instanceof Reference) {
            try {
                result = NamingManager.getObjectInstance(result, null, null, this.environment);
            } catch (NamingException e) {
View Full Code Here

    * @throws NamingException DOCUMENT_ME
    */
   public void addResourceLink( ResourceLink resourceLink )
   throws NamingException
   {
      LinkRef link = new LinkRef( resourceLink.getTarget(  ) );
      this.createSubcontexts( resourceLink.getName(  ) );
      this.m_context.bind( resourceLink.getName(  ),
                         link );
      if ( LOG.isDebugEnabled(  ) )
      {
View Full Code Here

    * @throws NamingException DOCUMENT_ME
    */
   public void addResourceLink( ResourceLink resourceLink )
   throws NamingException
   {
      LinkRef link = new LinkRef( resourceLink.getTarget(  ) );
      this.createSubcontexts( resourceLink.getName(  ) );
      this.context.bind( resourceLink.getName(  ),
                         link );
      if ( LOG.isDebugEnabled(  ) )
      {
View Full Code Here

               // Get the
               try
               {
                  Object obj = ctx.lookupLink(name);

                  LinkRef link = (LinkRef) obj;
                  buffer.append("[link -> ");
                  buffer.append(link.getLinkName());
                  buffer.append(']');
               }
               catch (Throwable t)
               {
                  buffer.append("invalid]");
View Full Code Here

        
         if( isLinkRef )
         {
            try
            {
               LinkRef link = (LinkRef) ctx.lookupLink(name);
               out.print("[link -> ");
               out.print(link.getLinkName());
               out.print(']');
            }
            catch(Throwable e)
            {
               log.debug("failed", e);
View Full Code Here

                }
            }
        }
        if (result instanceof LinkRef)
        {
            LinkRef ref = (LinkRef) result;
            result = lookup(ref.getLinkName());
        }
        if (result instanceof Reference)
        {
            try
            {
View Full Code Here

TOP

Related Classes of javax.naming.LinkRef

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.