Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

multithreaded and transactional EJB System

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi guys,

I'm just starting to study EJB, by reading the Enterprise JavaBeans 3.0 book.

Actually, I'm doing this because in the near future I plan to use this technology in my company.

Today, we have an application that accesses N FTP servers and downloads files for the N corresponding local directories. It does uploads as well. Each of the FTP servers belongs to one specific client of our company. Therefore, the app must be multithreaded. And it is. It manages multiple threads, one for each of the ftp servers it has to access. We are using the Apache FTP API for the FTP operations.

So here's my question:


- If I were to develop this application using EJB, one of the benefits it would provide me with is the multithreaded management?

Say, the code from the run methods from the threads of my application today would be passed to the EJB, which would run and manage one thread for each of the FTP configurations that I pass on to it?


Another thing:

- I'd like it to be a transactional system. All of the downloads and uploads are registered in a database. And right after it has abeen registered, the downloaded file is deleted from the FTP server from which it was downloaded. I'd like the file to only be deleted if it had really been downloaded and registered in the database. I believe it is a transactional behavior, right?
Today, if some exception occurs, it might happen that the file was downloaded and registered in the database, but never deleted from the FTP server. Would EJB grant me this too?

And another thing:

In a few weeks I'll need to develop a system that is specialized in sending and downloading emails. Like this FTP service I mentioned above, it will have to be a multhreaded system as well. Would it be recommendable to develop such a system by using EJB technology?

Thank you.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please don't post the same question in more than one forum.
 
    Bookmark Topic Watch Topic
  • New Topic