FileDocCategorySizeDatePackage
LinkRefEncInjector.javaAPI DocJBoss 4.2.12029Fri Jul 13 20:53:46 BST 2007org.jboss.injection

LinkRefEncInjector

public class LinkRefEncInjector extends Object implements EncInjector
Comment
author
Bill Burke
version
$Revision: 60233 $

Fields Summary
private String
jndiName
private String
error
private String
encName
Constructors Summary
public LinkRefEncInjector(String name, String mappedName, String error)

      this.jndiName = mappedName;
      this.error = error;
      this.encName = name;
   
Methods Summary
public voidinject(InjectionContainer container)

      try
      {
         Util.rebind(container.getEnc(), encName, new LinkRef(jndiName));
      }
      catch (NamingException e)
      {
         throw new RuntimeException(new StringBuilder().append("could not bind enc name '").append(encName).append("' for ").append(error).append(" for container ").append(container.getIdentifier()).append(e.getMessage()).toString());
      }