What pro I need to mention to get context of Ejb deployed on glassfish from stand alone app
Hi,
I wanted to know what are pros I need to provide to get context
of my ejb on glassfish.
Note I am want to get this context from simple java app.
Hi,
I wanted to know what are pros I need to provide to get context
of my ejb on glassfish.
Note I am want to get this context from simple java app.
Support Staff 2 Posted by Anton on 23 Feb, 2012 01:20 PM
Hello Akshay,
You have to do the same steps like you locally do. Did you do it locally?
Regards,
Anton.
3 Posted by Akshay on 23 Feb, 2012 01:31 PM
Yes I have tried it locally.I have attached my code.
//props.setProperty("org.omg.CORBA.ORBInitialHost", "dsa-eno.jelastic.servint.net"); //props.setProperty("org.omg.CORBA.ORBInitialPort", "3700"); I remove comments while testing on jelastic.
Please let me know where where I am doing mistake.
server log
[#|2012-02-23T15:36:38.209+0300|INFO|glassfish3.1.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|ThreadID=10;ThreadName=Thread-3;|Portable JNDI names for EJB ServiceEjb : [java:global/dsa_gwt_ear/dsa_ejbs/ServiceEjb!com.enovate.dsa.ejbs.ServiceEjbRemote, java:global/dsa_gwt_ear/dsa_ejbs/ServiceEjb!com.enovate.dsa.ejbs.ScreenServiceRemote]|#]
[#|2012-02-23T15:36:39.213+0300|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|ThreadID=10;ThreadName=Thread-3;|CORE10010: Loading application dsa_gwt_ear done in 65,101 ms|#]
Support Staff 4 Posted by Anton on 23 Feb, 2012 02:17 PM
Oh, you have to do it from app that is deployed in your jelastic environment. Now we are going to provide external access via IPv4. In our next release.
Regards,
Anton.
5 Posted by Akshay on 23 Feb, 2012 02:39 PM
So you mean I cant access ejb proxy object from external environment and If i have any web application with servlet in same environment I will get this ejb proxy in servlet. right ?
Support Staff 6 Posted by Anton on 23 Feb, 2012 04:40 PM
I mean you can connect to your EJB from your local (firs time I thoght you were trying to connect to db) machine via RMI, maybe you have to make look up according to this http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html
Seems you have to mentioned just EJB name in look up.
Regards,
Anton.
7 Posted by Akshay on 24 Feb, 2012 09:18 AM
Just ejb name will do only if my app is on same environment.
But in my situation my app is simple java app which runs on my desktop try to get proxy for ejb from jelastic.
any suggestion ?
Support Staff 8 Posted by Anton on 24 Feb, 2012 09:38 AM
We are going to make a tutorial how to connect to EJB asap, stay tuned.
Anton.