?? 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 + -