http://ofbiz.116.s1.nabble.com/OFBiz-Dev-Sample-RMI-Client-from-ofbiz-blog-tp166143p166148.html
Please disregard my previous post. The "cannot locate service" error
from the service being named incorrectly in the code.
Calling services remotely is a very cool feature for us. Thanks again
for your efforts.
> David,
>
> Thanks for the information. I was able to get a simple RMI client
> connecting to the RMIDispatcher successfully. The problem I am seeing
> right now is that the RemorteDispatcherImpl.runSync() is not able to
> find the service name. It looks like the service initialization for
> the remote access is not working right. I first thought it was an
> "export" setting in the service but this was not the case. I have
> tried several services and I get the same "Cannot locate service by
> name".
>
>
> Here is a short stack trace:
>
> org.ofbiz.service.GenericServiceException: Cannot locate service by
> name (testSvc)
> at org.ofbiz.service.DispatchContext.getModelService(DispatchContext.java:208)
> at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:109)
> at org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>
> I know you're busy so if you can point me in some direction as to
> where this problem could be occurring I'll track it down and report
> back. I don't think it is a configuration problem, because I can call
> the services all right from inside the applications, but let me know
> if you think otherwise.
>
> Thanks again for your help.
>
>
> Brett
>
>
>
>
>
> On 10/14/05, David E. Jones <
[hidden email]> wrote:
> >
> > The code would look something like this:
> >
> > protected final static String RMI_URL = "rmi://localhost:1099/
> > RMIDispatcher"; // change to match the remote server
> > RemoteDispatcher rd = (RemoteDispatcher) Naming.lookup(RMI_URL);
> > rd.runSync("testScv", context);
> >
> > There are some jar and other files you need in the client
> > application, including these (should be all, but if you run into any
> > errors with missing resources there might be more):
> >
> > ofbiz-service-rmi.raj (rename to .jar instead of .raj)
> > commons-collections.jar
> > javolution.jar
> > jdbm.jar
> > log4j.jar
> > ofbiz-base.jar
> > debug.properties
> > cache.properties
> > jsse.properties
> >
> > You may also need the "ofbiz.home" java env variable set for
> > locations (like in jsse.properties) that are relative to ofbiz.home.
> >
> > -David
> >
> >
> > On Oct 14, 2005, at 3:59 PM, Brett Palmer wrote:
> >
> > > I would like to have a remote reference to the service engine via
> > > JNDI. This is intended for utility applications that woud be run
> > > within a data center as well as server to server integration. What
> > > can I call from the RmiServiceContainer that is listening on port
> > > 1099?
> > >
> > > Thanks,
> > >
> > > Brett
> > >
> > > On 10/14/05, David E. Jones <
[hidden email]> wrote:
> > >
> > >>
> > >> What kind of RMI client are you trying to use? Will the client have
> > >> an instance of the service engine running locally, or will it get a
> > >> remote reference to a service engine via JNDI?
> > >>
> > >> -David
> > >>
> > >>
> > >> On Oct 14, 2005, at 4:45 AM, Brett Palmer wrote:
> > >>
> > >>
> > >>> There was a reference to an RMI Client on the ofbiz blog, Friday,
> > >>> April 29, 2005, SVN r4930 :
> > >>>
> > >>> "RMI client added to build (r4911)"
> > >>>
> > >>> I haven't been able to this RMI client. Does anyone have one that
> > >>> they can post? I would like to use RMI to call ofbiz services
> > >>> remotely from one server to another.
> > >>>
> > >>> Thanks in advance,
> > >>>
> > >>>
> > >>> Brett
> > >>>
> > >>> _______________________________________________
> > >>> Dev mailing list
> > >>>
[hidden email]
> > >>>
http://lists.ofbiz.org/mailman/listinfo/dev> > >>>
> > >>>
> > >>
> > >>
> > >>
> > >>
> > >> _______________________________________________
> > >> Dev mailing list
> > >>
[hidden email]
> > >>
http://lists.ofbiz.org/mailman/listinfo/dev> > >>
> > >>
> > >>
> > >>
> > >
> > > _______________________________________________
> > > Dev mailing list
> > >
[hidden email]
> > >
http://lists.ofbiz.org/mailman/listinfo/dev> > >
> >
> >
> > _______________________________________________
> > Dev mailing list
> >
[hidden email]
> >
http://lists.ofbiz.org/mailman/listinfo/dev> >
>