简体   繁体   中英

How to call EJB

I need to call EJB (created using NETBEANS ide having glassfish server) from a plain java program (without using any IDE). I have been told to create both EJB and client in different JVMs , and then get them executed. (by different JVMs I dont mean different insatnces of a JVM).

Have a look here: http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB

You can use any IDE to create your client application, for testing purposes you would have to move it to another machine and configure it to connect to your running glassfish instance (look into part 4 in the mentioned document)

just as what you do between different JVM instances.

put a interface jar in your class path and lookup ejb instance from JNDI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM