Search code examples
javanetbeansglassfishejb

Standalone java Glasshfish client. Reference to gf-client.jar


i'm deploying an application making use of EJB. I'have wrote an EJB and a java standalone client to connect to. Everything works correctly. However, i have a question regarding the JAR dependencies. I'm using Netbeans 7.1.2 and Glassfish 3.1.2 and the jars i have added to my client application are:

  1. appserv-rt.jar
  2. javaee.jar
  3. gf-client.jar

I have read from here : http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB, than gf-client.jar hold by itself lot of dependencies. After looking at the MANIFEST file inside it, i saw that it provides lot of relatives path to others jars and then, i HAVE TO refer this jar directly in the glassfish installation path. This is not acceptable if i want to distribute this application to clients, all the clients using the application (client) would need to download Glassfish?

So my question is, how can i handle that? Is there a way to avoid referring directly gf-client.jar from the glassfish install path?


Solution

  • Thanks,

    i have solved my issue by adding those jars to my project:

    auto-depends.jar
    deployment-common.jar
    glassfish-corba-internal-api.jar
    internal-api.jar
    management-api.jar
    bean-validator.jar
    dol.jar
    glassfish-corba-newtimer.jar  
    javax.ejb.jar
    orb-connector.jar
    common-util.jar
    ejb-container.jar
    glassfish-corba-omgapi.jar  
    javax.jms.jar
    orb-iiop.jar
    config-api.jar
    ejb.security.jar
    glassfish-corba-orb.jar
    javax.resource.jar
    security.jar
    config-types.jar
    glassfish-api.jar
    glassfish-corba-orbgeneric.jar  
    javax.servlet.jar
    ssl-impl.jar
    config.jar
    glassfish-corba-asm.jar
    glassfish-naming.jar
    javax.transaction.jar
    transaction-internal-api.jar
    connectors-internal-api.jar    
    glassfish-corba-codegen.jar    
    gmbal.jar
    jta.jar
    container-common.jar
    glassfish-corba-csiv2-idl.jar  
    hk2-core.jar
    kernel.jar

    I don't think all the jars are needed in some case. Hope it would help.