📄 testclient.java
字号:
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package test.client;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import test.interfaces.TestSession;
import test.interfaces.TestSessionHome;
public class TestClient {
public static void main(String[] args){
try {
InitialContext lContext = new InitialContext();
TestSessionHome lHome = (TestSessionHome) lContext.lookup( "ejb/test/TestSession" );
TestSession lSession = lHome.create();
// Get a new Id of the Test Entity
int lId = lSession.getNewEntityId();
System.out.println( "New Entity Id is: " + lId );
lSession.remove();
} catch( Exception e ){
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -