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

📄 startup.java

📁 EJB3.0请一定要上载质量高而且本站没有的源码
💻 JAVA
字号:
package examples.jndi;
import javax.naming.*;

/**
 * A helper class which starts our RMI-IIOP server
 */
public class Startup { 

     /**
      * Our main() method starts things up
      */
     public static void main(String args[]) throws Exception { 

          /*
           * Start up our PKGenerator remote object.  It will
           * automatically export itself.
           */
          PrimaryKeyGenerator generator = new PrimaryKeyGeneratorImpl();

          /*
           * Bind our PKGenerator remote object to the JNDI tree
           */
          Context ctx = new InitialContext(System.getProperties());
          ctx.rebind("PKGenerator", generator);
          System.out.println("PKGenerator bound to JNDI tree.");

          // wait for clients
          synchronized (generator) { 
            generator.wait();
          } 
     } 
}

⌨️ 快捷键说明

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