View Javadoc

1   // ========================================================================
2   // $Id: EnvEntry.java 3680 2008-09-21 10:37:13Z janb $
3   // Copyright 2006 Mort Bay Consulting Pty. Ltd.
4   // ------------------------------------------------------------------------
5   // Licensed under the Apache License, Version 2.0 (the "License");
6   // 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
9   // Unless required by applicable law or agreed to in writing, software
10  // distributed under the License is distributed on an "AS IS" BASIS,
11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  // See the License for the specific language governing permissions and
13  // limitations under the License.
14  // ========================================================================
15  
16  package org.mortbay.jetty.plus.naming;
17  
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  import javax.naming.Binding;
23  import javax.naming.Context;
24  import javax.naming.InitialContext;
25  import javax.naming.NameNotFoundException;
26  import javax.naming.NamingEnumeration;
27  import javax.naming.NamingException;
28  
29  import org.mortbay.log.Log;
30  import org.mortbay.naming.NamingUtil;
31  
32  
33  /**
34   * EnvEntry
35   *
36   *
37   */
38  public class EnvEntry extends NamingEntry
39  {
40      private boolean overrideWebXml;
41    
42  
43      public EnvEntry (Object scope, String jndiName, Object objToBind, boolean overrideWebXml)
44      throws NamingException
45      {
46          super (scope, jndiName, objToBind);
47          this.overrideWebXml = overrideWebXml;
48      }
49      
50      public EnvEntry (Object scope, String jndiName, Object objToBind)
51      throws NamingException
52      {
53          this (scope, jndiName, objToBind, false);
54      }
55      
56      public EnvEntry (String jndiName, Object objToBind)
57      throws NamingException
58      {
59          this(jndiName, objToBind, false);
60      }
61      
62      public EnvEntry (String jndiName, Object objToBind, boolean overrideWebXml)
63      throws NamingException
64      {
65          super(jndiName, objToBind);
66          this.overrideWebXml = overrideWebXml;
67      }
68      
69      
70      public boolean isOverrideWebXml ()
71      {
72          return this.overrideWebXml;
73      }
74  }