This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am quite new to EJB 3.0 but have had a good deal of success including using JNDI to lookup Remote Stateless Session Bean in EJB 3.0. However, looking up local Stateless Session Bean prove more challenging with I had anticipated. Here is my code as follows:
Output when running ClientAccessRemoteCalculator gives
1 + 1 = 2 1 - 1 = 0
Output when running ClientAccessLocalCalculator on JBoss AS 4.0.5 gives:
Exception in thread "main" javax.ejb.EJBException: Invalid invocation of local interface (null container) at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:75) at $Proxy0.add(Unknown Source) at ClientAccessLocalCalculator.main(ClientAccessLocalCalculator.java:14)
JNDIView in JMX-Console in JBoss:
Output when running ClientAccessLocalCalculator on SJSAS 9.0 gives: