User: starksm Date: 02/02/25 00:11:21 Added: src/main/org/jboss/test/securitymgr/ejb IOStatelessSessionBean.java Log: Unit tests for running JBoss under a security manager Revision Changes Path 1.1 jbosstest/src/main/org/jboss/test/securitymgr/ejb/IOStatelessSessionBean.java Index: IOStatelessSessionBean.java =================================================================== package org.jboss.test.securitymgr.ejb; import java.io.File; import java.io.IOException; import java.security.Principal; import javax.ejb.CreateException; import javax.ejb.EJBException; import javax.ejb.SessionBean; import javax.ejb.SessionContext; import org.apache.log4j.Category; /** A session bean that attempts I/O operations not allowed by the EJB 2.0 spec as a test of running JBoss with a security manager. @author [EMAIL PROTECTED] @version $Revision: 1.1 $ */ public class IOStatelessSessionBean implements SessionBean { Category log = Category.getInstance(getClass()); private SessionContext sessionContext; public void ejbCreate() throws CreateException { } public void ejbActivate() { } public void ejbPassivate() { } public void ejbRemove() { } public void setSessionContext(SessionContext context) { sessionContext = context; } /** */ public String read(String path) throws IOException { log.debug("read, path="+path); File tstPath = new File(path); if( tstPath.exists() == false ) path = null; return path; } public void write(String path) throws IOException { log.debug("write, path="+path); File tstPath = new File(path); tstPath.createNewFile(); } }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development