⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nicethingsbeanejb.java

📁 一个web service的开发工具
💻 JAVA
字号:
package samples.ejb;import javax.ejb.*;public class NiceThingsBeanEJB implements SessionBean {        public void ejbCreate() {}    public void ejbActivate() {}    public void ejbPassivate()  {}    public void ejbRemove() {}    public void setSessionContext(SessionContext sc) {}    // "Business" Methods:    public String sayHello(String name) {        return ( "Hiya " + name + ", how are you?");    }    public NiceThings findNiceThingsFor(String name) {        // In reality our bean would probably be looking up these nice        // things from an entity bean. In our case we'll just cheat :)                NiceThings niceThings = new NiceThings("cake",                                               23,                                               "black as night");        return niceThings;    }            public boolean updateNiceThingsFor(String name, NiceThings niceThings) {        // In reality this bean would probably try and update nice things         // in the relevant entity bean(s) and return a boolean to indicate         // whether the update was successful or not. Again, we'll cheat.        return true;    }        }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -