The spec says a lot of things. It also says it prohibits JNI yet most App. servers 
also allow this.


On Wed, 1 Mar 2000 17:38:17 +0100, Marc-Oliver Scheele <[EMAIL PROTECTED]> wrote:

>Hello;
>
>I thought the EJB 1.1 prohibited file access via java.io.*.
>
>I tested it against the sun's J2EE, because they have
>fully implemented EJB 1.1.
>
>And what a surprise:
>There are no restrictions for I/O!
>
>Here is the code I used in my bean:
>
>import javax.ejb.*;
>import java.io.*;
>public class AdderEJB implements SessionBean
>{
>
>   int total;
>
>   public void ejbCreate() {
>      total = 0;
>   }
>
>   public void ejbCreate(int initial) {
>      total = initial;
>   }
>
>   public void add(int number) {
>      total += number;
>      try {
>        File file= new java.io.File("c:/temp/newww.txt");
>        FileWriter writer = new FileWriter(file);
>        writer.write("Hallo dies ist eine I/O-Operation mit EJB");
>        writer.close();
>      } catch (Exception exc) {
>        System.out.println("Konnte nicht schreiben---- ");
>        exc.printStackTrace();
>      }
>   }
>
>   public int getTotal() {
>      return total;
>   }
>
>   public AdderEJB() {}
>   public void setSessionContext(SessionContext sc) {}
>   public void ejbRemove() {}
>   public void ejbActivate() {}
>   public void ejbPassivate() {}
>
>} // AdderEJB
>
>
>Greetings
>Oliver
>Marc-Oliver Scheele
>Vorstand der Se@rchBroker AG
>----------------------------------------
>Web1:   http://www.SearchBroker.de
>Web3:   http://www.MetaDir.de
>eMail:  [EMAIL PROTECTED]
>Fon:    0351/433090-10
>---------------------------------------
>
> ==========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff EJB-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to