9 Replies Latest reply on Nov 22, 2012 3:23 AM by pedrokowalski

    Global JNDI for Remote EJB Clients

    pedrokowalski

      Howdy Guys,

       

      I have mixed answers for the following question: is the Global JNDI, introduced in Java EE 6, also supported for the remote EJB clients? From the spec it isn't clear if I should be able to lookup the component using java:global/app-name/module-name/bean-name!interface-fqn from the standalone client.

      I know that in JBoss AS 7 we have remoting project (that allows you to fetch not only EJB's but other type of remote-accessible resources) and EJB Client API (that supports JBoss' own ejb: names).

       

      If this connection is not standardized - it means that I need to access different JNDI names for each supported server, so my client needs to be recompiled each time the backend server is changed (even better - it needs to be changed even if I use JBoss 6.1 and moved to JBoss AS 7.1). Do you know of any reasons why such communication and JNDI coordinates cannot be standardized?

       

      Thanks in advance for your time.

        • 1. Re: Global JNDI for Remote EJB Clients
          rodakr

          You can star to write specification :-)

           

          You might consider take a look on application client

           

          Pozdrawiam

          Radek

          • 2. Re: Global JNDI for Remote EJB Clients
            pedrokowalski

            Cześć Radek,

             

            The application client container seems to be like one of those rare animals in Java EE menagerie that noone really uses. Nevertheless, it doesn't seem to be portable but it's rather aimed at particular server vendor, right? So the portabiliby is broken as well.

             

            I am definitely not capable of writing the specification. I am rather curious why it is not standardized, as I don't believe I'm the first one to ask this question. The EG must have taken this under consideration and decided not to create any kind of standardization there, so I am curious: why?

             

            All the best,

            Piotr

            • 3. Re: Global JNDI for Remote EJB Clients
              rodakr

              Pozdawiam

               

              You asked about specification:

              http://download.oracle.com/otndocs/jcp/javaee-6.0-fr-oth-JSpec/    page 207

               

              I'm surprised you don't like it... :-)

              Mabe lot of peoples are just not up to date and they never tried it...

               

              Radek

              • 4. Re: Global JNDI for Remote EJB Clients
                rodakr

                It has one big advantage over all other methods.

                You Client to Server code is same as server 2 server.

                 

                And should be same for different containers.

                If you can live with it, having to change libs depends on container implementation.

                • 5. Re: Global JNDI for Remote EJB Clients
                  pedrokowalski

                  Hello Radek,

                  You asked about specification:

                  http://download.oracle.com/otndocs/jcp/javaee-6.0-fr-oth-JSpec/    page 207

                   

                  I'm surprised you don't like it... :-)

                  Uhm, actually I don't recall saying I don't like it :-) I've just said that I am not capable of writing a specification - and this was answer to your "you can always start to write specification" and that the Application Client is rather not a first class citizen in Java EE world (this topic was also discussed in Java EE 7 Expert Group about 2 days ago).

                   

                  I totally agree - changing the libs is much more comfortable than consulting each app server and changing the JNDI name.

                   

                  Are you using the app client in real-life projects? Did you have any problem bootstraping it in already established production environment?

                   

                  Thanks and all the best!

                   

                  Piotr

                  • 6. Re: Global JNDI for Remote EJB Clients
                    rodakr

                    Hello Piotr

                     

                    I don't use it, because for my personal opinion any StandAlone/Fat Client has no future.

                    All Projects I was working / I'm working on, goes to web based solutions.

                    I used this one time and it worked fine. Instead to spend time how to code you spend time how to configure...

                    Every body use mobile davices, Ipads, Desktops and using Web solution fit best for this purpose.

                     

                    Mabe you can take a look on quickstart examples, nice working examples.

                     

                    Have fun

                    Radek

                    • 7. Re: Global JNDI for Remote EJB Clients
                      wolfc

                      As to why this is or isn't standardized follow the recent thread on EJB EG users list: http://java.net/projects/ejb-spec/lists/users/archive/2012-11/message/13.

                      • 8. Re: Global JNDI for Remote EJB Clients
                        pedrokowalski

                        As much as I agree with the statement that we should go with web-based - it's not always an option.

                         

                        For some industry or production use-cases, you can still be locked with thin, but standalone clients.

                         

                        I will take a look at application client container in more details in the following weekend.

                         

                        Thanks and best regards,

                        Piotr

                        • 9. Re: Global JNDI for Remote EJB Clients
                          pedrokowalski

                          Thanks Carlo,

                           

                          I've just joined the discussion - I think John has the same issue as in this thread.

                           

                          Best,

                          Piotr