Hi Marc,
<vendor>
IAS doesn't impose these restrictions on the user, using IO
and threads are allowed. I guess they figured that since you're
using IAS you know what's best ( :) ) and won't do something
harmful in your code.
</vendor>
eyal.
>
> 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
>
>
===========================================================================
> 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".