5 Replies Latest reply on Nov 20, 2007 2:48 PM by darren hartford


    darren hartford Expert

      I'm trying to expose an existing ejb3 method so many other GWT web applications can access it directly through SEAM remoting.

      Exception while dispatching incoming RPC call

      java.lang.RuntimeException: Type cannot be determined for component

      [Component(com.domain.app.gwt.client.QueryGwtService)]. Please ensure that it has a local interface.

      EJB3 SIDE:
      package com.domain.app.ejb;
      //Name is the GWT sych service
      public class QueryGwt implements QueryGwtLocal {

      public String gwtTest2(){
      return "test ok";

      package com.domain.app.ejb;
      public interface QueryGwtLocal {
      public String gwtTest2();
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">

      <!-- SEAM 2.0 support -->


      empty seam.properties in the root of the jar.

      Is this all you need to do for the EJB3/server side so it can be consumed by may other GWT web applications?

      Sample GWT side:
      <?xml version="1.0" encoding="UTF-8"?>
      <components ....>


      <core:manager conversation-timeout="120000"/>



      <servlet-name>Seam Resource Servlet</servlet-name>

      <servlet-name>Seam Resource Servlet</servlet-name>

      <!--DRH modified url-pattern to match how GWT app works -->
      package com.domain.app.gwt.client;
      public interface QueryGwtService extends RemoteService{
      public String gwtTest2();
      package com.domain.app.gwt.client;
      public interface QueryGwtServiceAsync{
      public void gwtTest2(AsyncCallback callback);
      //sample call to get service
      private QueryGwtServiceAsync getService()
      String endpointURL = GWT.getModuleBaseURL() + "seam/resource/gwt";
      QueryGwtServiceAsync svc = (QueryGwtServiceAsync) GWT.create(QueryGwtService.class);
      ((ServiceDefTarget) svc).setServiceEntryPoint(endpointURL);
      return svc;

      My concern is, the example says to put the GWT Sych interface/service on the EJB3 side, which does not make sense as multiple GWT apps could use it and would need to copy that interface again.

      Any pointers please? Thanky,