What pro I need to mention to get context of Ejb deployed on glassfish from stand alone app

Akshay's Avatar

Akshay

23 Feb, 2012 12:29 PM via web

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.

  1. Support Staff 2 Posted by Anton on 23 Feb, 2012 01:20 PM

    Anton's Avatar

    Hello Akshay,
    You have to do the same steps like you locally do. Did you do it locally?

    Regards,
    Anton.

  2. 3 Posted by Akshay on 23 Feb, 2012 01:31 PM

    Akshay's Avatar

    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|#]

  3. Support Staff 4 Posted by Anton on 23 Feb, 2012 02:17 PM

    Anton's Avatar

    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.

  4. 5 Posted by Akshay on 23 Feb, 2012 02:39 PM

    Akshay's Avatar

    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 ?

  5. Support Staff 6 Posted by Anton on 23 Feb, 2012 04:40 PM

    Anton's Avatar

    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.

  6. 7 Posted by Akshay on 24 Feb, 2012 09:18 AM

    Akshay's Avatar

    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 ?

  7. Support Staff 8 Posted by Anton on 24 Feb, 2012 09:38 AM

    Anton's Avatar

    We are going to make a tutorial how to connect to EJB asap, stay tuned.

    Anton.

Reply to this discussion

Internal reply

Formatting help or Preview

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Recent Discussions

17 May, 2012 07:11 PM
17 May, 2012 06:16 PM
17 May, 2012 02:24 PM