[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...

Gavin King gavin.king at jboss.com
Thu Sep 28 18:30:52 EDT 2006


  User: gavin   
  Date: 06/09/28 18:30:52

  Modified:    src/main/org/jboss/seam/contexts  StatelessContext.java
  Log:
  throw unsupported operation
  
  Revision  Changes    Path
  1.10      +60 -72    jboss-seam/src/main/org/jboss/seam/contexts/StatelessContext.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: StatelessContext.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/StatelessContext.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- StatelessContext.java	15 Apr 2006 05:40:27 -0000	1.9
  +++ StatelessContext.java	28 Sep 2006 22:30:52 -0000	1.10
  @@ -6,7 +6,6 @@
   ?*/
   package org.jboss.seam.contexts;
   
  -import javax.naming.InitialContext;
   import javax.naming.NamingException;
   
   import org.jboss.seam.ScopeType;
  @@ -18,7 +17,7 @@
    * 
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
   public class StatelessContext implements Context {
   
  @@ -37,13 +36,7 @@
   	}
   
   	public void set(String name, Object value) {
  -		try {
  -		   InitialContext initialContext = Naming.getInitialContext();
  -           initialContext.bind(name, value);
  -		}
  -		catch (NamingException ne) {
  -			throw new IllegalArgumentException("could not bind: " + name, ne);
  -		}
  +		throw new UnsupportedOperationException("attempt to write to stateless context");
   	}
   
   	public boolean isSet(String name) {
  @@ -51,12 +44,7 @@
   	}
   
   	public void remove(String name) {
  -		try {
  -           Naming.getInitialContext().unbind(name);
  -		}
  -		catch (NamingException ne) {
  -			throw new IllegalArgumentException("could not unbind: " + name, ne);
  -		}
  +      throw new UnsupportedOperationException("attempt to write to stateless context");
   	}
   
   	public String[] getNames() {
  
  
  



More information about the jboss-cvs-commits mailing list