Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.spi.ee » [javadoc | source]

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements. See the NOTICE file distributed with this
    4    * work for additional information regarding copyright ownership. The ASF
    5    * licenses this file to You under the Apache License, Version 2.0 (the
    6    * "License"); you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
    9    * or agreed to in writing, software distributed under the License is
   10    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   11    * KIND, either express or implied. See the License for the specific language
   12    * governing permissions and limitations under the License.
   13    */
   14   package org.apache.webbeans.spi.ee;
   15   
   16   import org.apache.webbeans.exception.WebBeansException;
   17   import org.apache.webbeans.spi.JNDIService;
   18   import org.apache.webbeans.util.JNDIUtil;
   19   
   20   /**
   21    * SPI Implementation of the JNDIService.
   22    * This version performs JNDI handling in J2EE environments where
   23    * the java:comp and java:app context can be written
   24    *
   25    * @see org.apache.webbeans.spi.se.JNDIServiceStaticImpl
   26    */
   27   public final class JNDIServiceEnterpriseImpl implements JNDIService
   28   {
   29       public JNDIServiceEnterpriseImpl()
   30       {
   31           
   32       }
   33   
   34       /** 
   35        * {@inheritDoc}
   36        */
   37       public void bind(String name, Object object) throws WebBeansException
   38       {
   39           JNDIUtil.bind(name, object);
   40       }
   41   
   42       /** 
   43        * {@inheritDoc}
   44        */
   45       public void unbind(String name) throws WebBeansException
   46       {
   47           JNDIUtil.unbind(name);
   48       }
   49       
   50       /** 
   51        * {@inheritDoc}
   52        */
   53       public <T> T getObject(String name, Class<? extends T> expectedClass) throws WebBeansException
   54       {
   55           return JNDIUtil.lookup(name, expectedClass);
   56       }
   57   }

Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.spi.ee » [javadoc | source]