![]() |
Conecction Ejb 3.0 Remote
Hello:captain:
I need to connect a client with a apliccation that is deployed in WASCE i`m making a test but i have a problem... HELP ME this is my code:::: *****Remote***** package prueba; import javax.ejb.Remote; @Remote public interface pruebaRemote { public String metodo(String arg); } ****Stateless***** package prueba; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; @Remote @Stateless public class PruebaBean implements pruebaLocal, pruebaRemote { @PersistenceContext EntityManager em; public static final String RemoteJNDIName = PruebaBean.class.getSimpleName() + "/remote"; public static final String LocalJNDIName = PruebaBean.class.getSimpleName() + "/local"; @TransactionAttribute() public String metodo(String arg) { // TODO Auto-generated method stub return arg; } } *******client****** import javax.ejb.EJB; import prueba.pruebaRemote; public class test { /** * @param args */ public static void main(String[] args) { new metodo(); } } class metodo{ @EJB pruebaRemote beanRemote; public metodo(){ System.out.println(beanRemote.metodo("Esto es una prueba")); } } *****and the error is**** Exception in thread "main" java.lang.NullPointerException at metodo.<init>(test.java:51) at test.main(test.java:19) ******************************* my email is legranadosb@yahoo.com |
| All times are GMT. The time now is 02:12 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.