Java核心代码例程之:(EJB) Bean
2008-01-05 08:40:17 来源:WEB开发网核心提示:import java.io.*;import java.util.*;import java.rmi.*;import javax.ejb.*;/** * Actual session Bean code. * * @see HelloWorldSessionBeanHome * @see HelloWorldSes
import java.io.*;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
/**
* Actual session Bean code.
*
* @see HelloWorldSessionBeanHome
* @see HelloWorldSession
**/
public class HelloWorldSessionBean
implements SessionBean
{
SessionContext _ctx = null;
PRoperties _props = null;
public void setSessionContext(SessionContext ctx)
{
_ctx = ctx;
_props = ctx.getEnvironment();
}
public String sayHello()
{
return "Hello, World!";
}
/** Required EJB method **/
public void ejbCreate () throws CreateException {}
/** Required EJB method **/
public void ejbActivate() {}
/** Required EJB method **/
public void ejbRemove() {}
/** Required EJB method **/
public void ejbPassivate() {}
}
更多精彩
赞助商链接