Developper documentation

Business Classes : the EJB of WIDE
h3. The data transfer service

data_transfer_service EJB aim to provide a request system to process upload files. It uses the imageDatabase as a container for upload request that client can access to request uploads. The cicero upload daemon will do the effective upload with a low bandwidth usage.

Interface of the upload service

Typical use of the interface

1. Connecting to the EJB

InitialContext ctx = new InitialContext();
uploadService = (UploadService) ctx.lookup("fr.cnrs.mri.service.transfer.UploadService");

2. Retrieving the next file to process

FileUploadInformation fileUploadInformation = uploadService.getNextUploadInformation("localhost");

The getNextUploadInformation return the actives upload request (i.e. the request which status is "created", "pending" or "running") for a host. This method return a FileUploadInformation object which gather information from UploadStatus, FileReference and UploadRequest.

The persitence class

UploadService.png - Database schema for handling upload (39.5 KB) Granier Alexandre, 08/23/2010 03:48 PM

PackageServiceTransfer.png - Interface UploadService (35.9 KB) Granier Alexandre, 08/23/2010 03:56 PM

UploadServicePersistence.png - EJB and persistence entities (40.6 KB) Granier Alexandre, 08/23/2010 04:14 PM