First of all, read the article in JavaWorld:
http://www.javaworld.com/javaworld/jw-08-2000/jw-0825-ejbrestrict.html

<snip>
4.
Using file access/java.io operations. EJB business components are meant to
use resource managers such as JDBC to store and retrieve application data
rather than the file system APIs. Also, deployment tools provide the
facility for storing environment entry elements (env-entry) into the
deployment descriptor, so that EJB components can perform environment entry
lookups in a standardized manner via the environment-naming context. Thus,
the need to use file system-based property files is mostly eliminated.
...
9. Starting, stopping, or managing threads in any way. That restriction
eliminates the possibility of conflicts with the EJB container's
responsibilities of managing locking, threading, and concurrency issues
10. Reading or writing a file descriptor directly
</snip>

I think that you should re-think your design and see if you have choosen the
right one, I doesn't look that way....

/kjetilhp

----- Original Message -----
From: "RaviKumar BV" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 11, 2000 6:52 AM
Subject: Restarting facility in stateless bean


> Hi
>
> Is it possible to give a restart facility in stateless session bean ?
>
> The problem is like this.
>
> In a stateless bean, there is a method called executeRule().
> This method will process a file which contains more than
> one million records.
>
> executeRule(){
>
>        while (EOF){
>         read a record from file
>         process it
>         write back it to file
>        }
> }
>
> When a client selects executeRule from the screen, then this procedure
> get activated. But I have to give a facility, through which client can
stop
> this process and restart it from the point (For ex: if client stops this
> when
> it processed 500 records, and when he restart the process, it should start
> processing from 501 records).
>
> Thanks & regards,
> Ravi.
>
>
===========================================================================
> 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