Source Listing

Following is a full listing of all source code used in this runnable example.

Implementation Resources

FileTransferBean.java

package org.jboss.ejb3.examples.ch06.filetransfer; import java.io.IOException; import java.io.Serializable; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.ejb.PostActivate; import javax.ejb.PrePassivate; import javax.ejb.Remote; import javax.ejb.Remove; import javax.ejb.Stateful; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.net.ftp.FTPReply; import org.jboss.logging.Logger; /** * Bean Implementation class of the FileTransferEJB, modeled * as a Stateful Session Bean * * @author <a href="mailto:andrew.rubinger@jboss.org">ALR</a> */ @Stateful(name = FileTransferBean.EJB_NAME) @Remote(FileTransferRemoteBusiness.class) public class FileTransferBean implements FileTransferRemoteBusiness, Serializable { //--------------------------------------------------------------------------|| // Class Members -----------------------------------------------------------|| //--------------------------------------------------------------------------|| /** * Serial Version UID */ private static final long serialVersionUID = 1L; /** * Logger */ private static final Logger log = Logger.getLogger(FileTransferBean.class); /** * Name of the EJB, used in Global JNDI addresses */ public static final String EJB_NAME = "FileTransferEJB"; /** * The name of the host to which ...

Get Enterprise JavaBeans 3.1, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.