• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session dependent files.... ?  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a client-server app. where I copy a number of files from the client onto the server and then do some checks on the files. The server side is written as an EJB.
Whilst these checks are ongoing on the server, if for whatever reason the connection is lost between client and server, how do I ensure that I don't get a load of files left on the server?
Will using a session bean take care of deleting the files if the system goes down? If not can anyone point me in the direction of how to handle this situation. (I would have thought that this is a common situation...)
Any help much appreciated.
Cheers
Ste
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Server would not do any automatic deleting of Files in the server. To achieve that you do your clean up job in ejbRemove()of the EJB.It will be called at the timeout of the bean. I presume that you are using stateful session bean for the purpose.
 
Ste Lamb
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many thanks...
I guess I was hoping for too much to assume it would automatically be handled for me... cheers for your help.
Also, Yes it is a stateful bean. I've been looking for a good example on how to implement/test the EJB I've written. I'm using JDeveloper, is there an easy way to test or do I have to deploy in order to test the functionality?
 
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to deploy your bean into an application server as Oracle 9iAS or JBoss.
Simon
 
Ste Lamb
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers folks...
Am now busily trying to deploy on the embedded OC4J server on JDeveloper to test it. I think this will enable to test my client/server application.
The fact you can do that you can do this doesn't seem to be documented anywhere... or am I missing something.
But anyway thanks for your help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!