Forums

angle-left Back

Communicate with a remote EJB3 server through JNDI

SE
Sam Wan, modified 9 Years ago.

Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Hi,

I want to add some code in my current portlet application to communicate with an EJB3 bean which located in another remote server through the use of JNDI. How do I supposed to do that?

Thanks
Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
I just realised that I may need to add some jboss codes into the build.xml file when building my portlet client to communicate wtih remote EJB3 through JNDI. But I don't know what should be added and modified in the current build.xml file. It is a portlet that built by ant/struts.

Any idea is very much appreciated.

Thanks
Sam
G_
gofri _, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Junior Member Posts: 92 Join Date: 3/2/07 Recent Posts
I am not sure, but I think you must add JBoss EJB client libraries (jars) in liferay server,
Maybe you should search Jboss site how to write a regular EJB client and convert it to a portlet.
Victor Zorin, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Legend Posts: 1209 Join Date: 4/14/08 Recent Posts
Sam, have a look how this service locator class does detection of EJB stateless session object. It uses JFig to locate service location host, you would not need this, take it out of code.

// MyOffice24x7, ServiceLocator
package com.myoffice.common.client;

import javax.naming.Context;
import javax.naming.InitialContext;
import org.igfay.jfig.JFig;
import java.util.*;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

public class ServiceLocator {
    private Map<String, java.lang.Object> cache;
    private static ServiceLocator ourInstance = new ServiceLocator();
    private static final Log logger = LogFactory
        .getLog(ServiceLocator.class);

    public static ServiceLocator getInstance() {
        return ourInstance;
    }

    private ServiceLocator() {
        this.cache = Collections.synchronizedMap(
                new HashMap<String, java.lang.Object>());
    }

    public java.lang.Object getService(String serviceName) {
        String serviceHost;
        if (this.cache.containsKey(serviceName)) {
            return this.cache.get(serviceName);
        } else {
            try {
                serviceHost = JFig.getInstance().getValue(
                        "service-location",
                        serviceName);
            } catch (Exception e) {
                logger.warn("Location is not configured for service " +
                                   serviceName +
                                   ". Using localhost.", e);
                serviceHost = "localhost";
            } catch (Throwable e) {
                logger.warn("Location is not configured for service " +
                                   serviceName +
                                   ". Using localhost.", e);
                serviceHost = "localhost";
            }
        }

            try {
                java.lang.Object service = this.getContext(
                        serviceHost).lookup(
                                serviceName + "Bean/remote");
                cache.put(serviceName, service);
                return service;
            } catch (Exception e) {
                e.printStackTrace();
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost, e);
                return null;
            } catch (Throwable e) {
                e.printStackTrace();
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost, e);
                return null;
            }

    }

    public java.lang.Object getService(String serviceName, String serviceHost) {
        String key = serviceHost + "." + serviceName;
        if (this.cache.containsKey(key)) {
            return this.cache.get(key);
        } else {
            try {
                java.lang.Object service = this.getContext(
                        serviceHost).lookup(
                                serviceName + "Bean/remote");
                cache.put(key, service);
                return service;
            } catch (Exception e) {
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost);
                return null;
            }
        }
    }

    private Context getContext(String serviceHost) throws javax.naming.NamingException
    {
        Properties properties = new Properties();
        properties.put(Context.INITIAL_CONTEXT_FACTORY,
                       "org.jnp.interfaces.NamingContextFactory");
        properties.put(Context.URL_PKG_PREFIXES,
                       "org.jboss.naming:org.jnp.interfaces");
        properties.put(Context.PROVIDER_URL, serviceHost + ":1099");
        return new InitialContext(properties);
    }
}


In your client code, use this service locator the following way:

    private YourEjbInterface  getSession() throws SystemErrorException {
        YourEjbInterface  mgr = null;
        mgr = (YourEjbInterface) ServiceLocator.getInstance().getService(
                "YourEjbInterface");
        if (mgr == null) {
            throw new SystemErrorException("Unable to connect to service");
        } else {
            return mgr;
        }
    }
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Hi Victor,

Thanks for the sample codes.
It looks like I don't need to modify my existing liferay ext development environment at all. Is it? This is awesome.
By the way, how have you been?

Thanks very much
Sam
Victor Zorin, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Legend Posts: 1209 Join Date: 4/14/08 Recent Posts
No, you do not have to modify anything in your devel. environment. It will also cover all your communication needs when you switch over to a server farm, EJB3 use samples are also ready for publishing on online manual.
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Hi Victor

To follow the Calculator example in JBOSS ejb3 tutorial,
there are 2 interfaces are there, which one should be put in liferay project path is unsure yet:

1. Calculator.java

package org.jboss.tutorial.stateless.bean;

public interface Calculator
{
   int add(int x, int y);

   int subtract(int x, int y);
}


2.CalculatorLocal.java

package org.jboss.tutorial.stateless.bean;

import javax.ejb.Local;

@Local
public interface CalculatorLocal extends Calculator
{
}


3. CalculatorRemote.java

package org.jboss.tutorial.stateless.bean;

import javax.ejb.Remote;

@Remote
public interface CalculatorRemote extends Calculator
{

}


4. CalculatorBean.java
package org.jboss.tutorial.stateless.bean;

import javax.ejb.Stateless;

@Stateless

public class CalculatorBean implements CalculatorRemote, CalculatorLocal
{
   public int add(int x, int y)
   {
      return x + y;
   }

   public int subtract(int x, int y)
   {
      return x - y;
   }
}


Which interface class should I move it to the liferay development project environment?

source code path:
# pwd
/usr/java-source/ejb3-tutorial/source/stateless/src/org/jboss/tutorial/stateless/bean
# ls
./ ../ Calculator.java CalculatorBean.java CalculatorLocal.java CalculatorRemote.java

Thanks
Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Opps... I may be known already. emoticon
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Hi Victor,

How do you include ejb jar file in liferay run-time?

I got error "javax.ejb does not exist" when I compiled my portlet.

Thanks
Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Hi Victor,

I have resolved the compile time error. Will test its functionaltiy soon.

Thanks alot
Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Hmm.. got run-time error about "Cannot instantiate class: org.jnp.interfaces.NamingContextFactory".

Should I copy all jboss jar files into
"/usr/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext"
or
"/usr/liferay-portal-5.2.3/tomcat-6.0.18/lib/" ?

Just dont' want to mess up the directory before get a confirmation .

Thanks very much
Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
I got the following run-time error:

javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)

NOt sure if I need to copy jboss jar files into the tomcat lib or ext directory?

Thanks very much
Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Sam Wan:
I got the following run-time error:

javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)

NOt sure if I need to copy jboss jar files into the tomcat lib or ext directory?

Thanks very much
Sam


Apology for the multiple posting, I didn't know my question is posted to the second page.

Sam
Victor Zorin, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Legend Posts: 1209 Join Date: 4/14/08 Recent Posts
Not sure if I need to copy jboss jar files into the tomcat lib or ext directory?

You can do it either way, it depends on how do you structure your projects and deployment configurations. You can also place them into portlet war. Have to consider the weight of files, project dependencies and ease of updates.
If you run liferay on jboss/tomcat, everything should be in place by default.

If duplicate post is made, a delete option is available to authors.
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
I got the following errors when I hit the submit button on my portlet application:


Jul 14, 2009 10:57:47 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/46  config=null
Jul 14, 2009 10:57:47 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 97284 ms
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [org.apache.catalina.loader.StandardClassLoader@16b13c7] whereas object of type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@16b13c7

].
log4j:ERROR Could not instantiate appender named "CONSOLE".
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
        at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1463)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:809)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)


the liferay is a liferay-tomcat bundle (5.2.3) and not the jboss-tomcat bundle.
I just simply copied jboss client libraries (jar files) over to the tomcat/lib/ folders then restarted tomcat.

Thanks
Sam

Here is the code:

1. ServiceLocator.java

import javax.naming.Context;
import javax.naming.InitialContext;
// import org.igfay.jfig.JFig;
import java.util.*;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

public class ServiceLocator {
    private Map<String, java.lang.Object> cache;
    private static ServiceLocator ourInstance = new ServiceLocator();
    private static final Log logger = LogFactory
        .getLog(ServiceLocator.class);

    public static ServiceLocator getInstance() {
        return ourInstance;
    }

    private ServiceLocator() {
        this.cache = Collections.synchronizedMap(
                new HashMap<String, java.lang.Object>());
    }

    public java.lang.Object getService(String serviceName) {
        String serviceHost = "192.168.1.242";
        if (this.cache.containsKey(serviceName)) {
            return this.cache.get(serviceName);
        }
            try {
                java.lang.Object service = this.getContext(
                        serviceHost).lookup(
                                serviceName + "Bean/remote");
                cache.put(serviceName, service);
                return service;
            } catch (Exception e) {
                e.printStackTrace();
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost, e);
                return null;
            } catch (Throwable e) {
                e.printStackTrace();
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost, e);
                return null;
            }

    }

    public java.lang.Object getService(String serviceName, String serviceHost) {
        String key = serviceHost + "." + serviceName;
        if (this.cache.containsKey(key)) {
            return this.cache.get(key);
        } else {
            try {
                java.lang.Object service = this.getContext(
                        serviceHost).lookup(
                                serviceName + "Bean/remote");
                cache.put(key, service);
                return service;
            } catch (Exception e) {
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost);
                return null;
            }
        }
    }

    private Context getContext(String serviceHost) throws javax.naming.NamingException
    {
        Properties properties = new Properties();
        properties.put(Context.INITIAL_CONTEXT_FACTORY,
                       "org.jnp.interfaces.NamingContextFactory");
        properties.put(Context.URL_PKG_PREFIXES,
                       "org.jboss.naming:org.jnp.interfaces");
        properties.put(Context.PROVIDER_URL, serviceHost + ":1099");
        return new InitialContext(properties);
    }
}


2.RegistrationAction.java

public class RegistrationAction extends PortletAction {

        public ActionForward execute(
                        ActionMapping mapping, ActionForm form, HttpServletRequest req,
                        HttpServletResponse res)
                throws Exception {

               //Get form and initialize only if number list not empty
               RegistrationForm ccrForm = (RegistrationForm) form;
                Emailer emailer = new Emailer();

                String name = ccrForm.getName().trim();
                String card_number = ccrForm.getCardNumber().trim();
                String emailaddr = ccrForm.getEmailaddr().trim();
                String comment = ccrForm.getComment().trim();
               if (name.length() > 0 && emailaddr.length() > 0 && card_number.length() > 0) {
      Calculator calculator = getSession();
System.out.println("in RegistrationAction class");
      System.out.println("1 + 1 = " + calculator.add(1, 1));
      System.out.println("1 - 1 = " + calculator.subtract(1, 1));
                  emailer.sendEmail(emailaddr, "support@ip6.com.au", "Inquiry", card_number, name, comment);
                  return mapping.findForward("/registration_portlet/help");
                }


               return mapping.findForward("/registration_portlet/input");
        }


        public ActionForward render(
                        ActionMapping mapping, ActionForm form, PortletConfig config,
                        RenderRequest req, RenderResponse res)
                throws Exception {

                RegistrationForm ccrForm = (RegistrationForm)form;

                return mapping.findForward("/registration_portlet/input");
        }


//      private Calculator  getSession() throws SystemErrorException {
        private Calculator  getSession() throws Exception {
                Calculator  mgr = null;
                mgr = (Calculator) ServiceLocator.getInstance().getService("Calculator");
                if (mgr == null) {
                        //throw new SystemErrorException("Unable to connect to service");
                        throw new Exception("Unable to connect to service");
                } else {
                        return mgr;
                }
        }

}


Thanks
Sam
Victor Zorin, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Legend Posts: 1209 Join Date: 4/14/08 Recent Posts
Ignore log4j errors.
Before things start working properly, simplify your setup and try to avoid portal installation. Too many points of failure.
Use your EJB3 app server and your development environment client (eclipse, jbuilder, netbeans, ant) only.
Run your calculator ejb on app server and make call ServiceLocator.getInstance().getService("Calculator") from devel. client.
Make it working in this setup first, only then move to portal.
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Victor Zorin:
Ignore log4j errors.
Before things start working properly, simplify your setup and try to avoid portal installation. Too many points of failure.
Use your EJB3 app server and your development environment client (eclipse, jbuilder, netbeans, ant) only.
Run your calculator ejb on app server and make call ServiceLocator.getInstance().getService("Calculator") from devel. client.
Make it working in this setup first, only then move to portal.


Good point, I haven't tried to make run your suggested code alone in commandline yet. I will try it soon.

Thanks Victor.

Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
I just tested the following code in command line with Ant, it works well.


package org.jboss.tutorial.stateless.client;

import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.*;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

public class ServiceLocator {
    private Map<String, java.lang.Object> cache;
    private static ServiceLocator ourInstance = new ServiceLocator();
    private static final Log logger = LogFactory
        .getLog(ServiceLocator.class);

    public static ServiceLocator getInstance() {
        return ourInstance;
    }

    private ServiceLocator() {
        this.cache = Collections.synchronizedMap(
                new HashMap<String, java.lang.Object>());
    }

    public java.lang.Object getService(String serviceName) {
        String serviceHost = "192.168.1.242";
        if (this.cache.containsKey(serviceName)) {
            return this.cache.get(serviceName);
        }

            try {
                java.lang.Object service = this.getContext(
                        serviceHost).lookup(
                                serviceName + "Bean/remote");
                cache.put(serviceName, service);
                return service;
            } catch (Exception e) {
                e.printStackTrace();
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost, e);
                return null;
            } catch (Throwable e) {
                e.printStackTrace();
                logger.error("Unable to bind to service "
                                   + serviceName + ". Hostname: " + serviceHost, e);
                return null;
            }

    private Context getContext(String serviceHost) throws javax.naming.NamingException
    {
        Properties properties = new Properties();
        properties.put(Context.INITIAL_CONTEXT_FACTORY,
                       "org.jnp.interfaces.NamingContextFactory");
        properties.put(Context.URL_PKG_PREFIXES,
                       "org.jboss.naming:org.jnp.interfaces");
        properties.put(Context.PROVIDER_URL, serviceHost + ":1099");
        return new InitialContext(properties);
    }
}


2. Client.java

package org.jboss.tutorial.stateless.client;

import org.jboss.tutorial.stateless.bean.Calculator;
import org.jboss.tutorial.stateless.bean.CalculatorRemote;
import org.jboss.tutorial.stateless.client.ServiceLocator;

public class Client
{
   public static void main(String[] args) throws Exception
   {
      Calculator calculator = getSession();
      System.out.println("in Client class");
      System.out.println("1 + 1 = " + calculator.add(1, 1));
      System.out.println("1 - 1 = " + calculator.subtract(1, 1));

   }

      private static Calculator  getSession() throws Exception {
             Calculator  mgr = null;
             mgr = (Calculator) ServiceLocator.getInstance().getService("Calculator");
                if (mgr == null) {
                        //throw new SystemErrorException("Unable to connect to service");
                        throw new Exception("Unable to connect to service");
                } else {
                        return mgr;
                }
        }

}


When I bring it into the liferay developemnt envirnoment merged into my portlet application, the application deployed sucessfully, but when that piecese of codes get triggered in the Action class, it thrown the following exception:


13:24:55,029 INFO  [PluginPackageUtil:1391] Finished checking for available updates in 3 ms
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
        at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1463)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:809)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)


I may have some jboss jar files missing, however I am sure I have copied all jboss/lib/client/*jar files into the tomcat/lib/ directory.

Thanks
Sam
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
I have put some trace (System println) in the Action class:
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]

it is failed at casting a return object to "Calculator":


package org.jboss.tutorial.stateless.client;

import org.jboss.tutorial.stateless.bean.Calculator;
import org.jboss.tutorial.stateless.bean.CalculatorRemote;
import org.jboss.tutorial.stateless.client.ServiceLocator;

public class Client
{
   public static void main(String[] args) throws Exception
   {
      Calculator calculator = getSession();
      System.out.println("in Client class");
      System.out.println("1 + 1 = " + calculator.add(1, 1));
      System.out.println("1 - 1 = " + calculator.subtract(1, 1));

   }

      private static Calculator  getSession() throws Exception {
             Calculator  mgr = null;

              /*** in Liferay environment, it failed at here *****/
             mgr = (Calculator) ServiceLocator.getInstance().getService("Calculator");

                if (mgr == null) {
                        //throw new SystemErrorException("Unable to connect to service");
                        throw new Exception("Unable to connect to service");
                } else {
                        return mgr;
                }
        }
}


Thanks
Sam
Victor Zorin, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Legend Posts: 1209 Join Date: 4/14/08 Recent Posts
Let's do partners' liferay training this Friday or following Monday. I'll also bring all supporting libraries and sample bundles with installations. Take your laptops with you. For 2 hours.
Give me a call. Will also show group-wise searching and also first versions of new suggestive search capability.
SE
Sam Wan, modified 9 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

Liferay Master Posts: 660 Join Date: 3/2/09 Recent Posts
Victor Zorin:
Let's do partners' liferay training this Friday or following Monday. I'll also bring all supporting libraries and sample bundles with installations. Take your laptops with you. For 2 hours.
Give me a call. Will also show group-wise searching and also first versions of new suggestive search capability.


Wow Victor, that will take up your time. I am so appreciate that. I am sure will see you on Friday.

Now, I am building Junit for this portlet app.
I got a problem here see if you can give me some suggestion:

# ant test
Buildfile: build.xml


compile-test:
    [javac] Compiling 4 source files

test:
    [junit] Testsuite: Client
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
    [junit]
    [junit] Null Test:  Caused an ERROR
    [junit] Client (wrong name: com/ip6networks/calling_card_registration/test/Client)
    [junit] java.lang.NoClassDefFoundError: Client (wrong name: com/ip6networks/calling_card_registration/test/Client)
    [junit]     at java.lang.ClassLoader.defineClass1(Native Method)
    [junit]     at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    [junit]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    [junit]     at java.lang.Class.forName0(Native Method)
    [junit]     at java.lang.Class.forName(Class.java:247)
    [junit]
    [junit]
    [junit] Test Client FAILED

BUILD SUCCESSFUL
Total time: 3 seconds


My *.java for this test are all here:

/usr/liferay-portal-5.2.3/dev/portlets/calling_card_reg/docroot/WEB-INF/src/com/ip6networks/calling_card_registration/test/
# ls -l
total 24
drwxr-xr-x  2 root  wheel   512 Jul 14 23:06 ./
drwxr-xr-x  4 root  wheel   512 Jul 14 22:30 ../
-rw-r--r--  1 root  wheel   150 Jul 14 23:06 Calculator.class
-rw-r--r--  1 root  wheel   147 Jul 14 23:05 Calculator.java
-rw-r--r--  1 root  wheel   241 Jul 14 23:06 CalculatorRemote.class
-rw-r--r--  1 root  wheel   150 Jul 14 23:06 CalculatorRemote.java
-rw-r--r--  1 root  wheel  1261 Jul 14 23:06 Client.class
-rw-r--r--  1 root  wheel  1060 Jul 14 23:06 Client.java
-rw-r--r--  1 root  wheel  2571 Jul 14 23:06 ServiceLocator.class
-rw-r--r--  1 root  wheel  2929 Jul 14 23:06 ServiceLocator.java


Thanks
Sam
GM
Gianmarco Morelli, modified 7 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

New Member Posts: 11 Join Date: 9/20/10 Recent Posts
I Have the same question, what solution u found?
MS
M s, modified 7 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

New Member Posts: 17 Join Date: 2/15/11 Recent Posts
I got the same error. can u let me know how this can be fixed.

Tried using jndiname/remote then its failing saying name not bound..
MS
M s, modified 7 Years ago.

RE: Communicate with a remote EJB3 server through JNDI

New Member Posts: 17 Join Date: 2/15/11 Recent Posts
I got the same error. can u let me know how this can be fixed.

Tried using jndiname/remote then its failing saying name not bound..