Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » [Help] How to run external application same time as server runnig
icon5.gif  [Help] How to run external application same time as server runnig [message #1059460] Sat, 18 May 2013 23:14 Go to next message
Err Adil is currently offline Err AdilFriend
Messages: 3
Registered: May 2013
Junior Member
h, I'm new in scout
i want to run external program on running a server
this program is depending to others jars

other question:
what is the best way to import the jars in scout project (i'm using just the classic way like other java project)

Re: [Help] How to run external application same time as server runnig [message #1059739 is a reply to message #1059460] Tue, 21 May 2013 13:14 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 154
Registered: March 2010
Senior Member
There is no Standard way, it depends on what you want to achieve.
But in most cases the following would be a modular and good solution with clear separations of code.

Assuming your Scout app is myapp.client, myapp.shared, myapp.server

1. create a new scout SERVER Service with the operations to call on that external program, (java methods) for example
public interface IExternalDataService extends IService{
  String ping();
}

Basically we are only interested in the Interface. Make sure that the interface is definied in the Server bündle, not in the shared bundle.

2. manually create a new eclipse Fragment Plug-In (fragment!) that uses the hist bundle myapp.server
This Fragment now contributes code to your myapp.server bundle. There could by such fragments for different operating systems, different os styles etc.

3. Create an implementation for that IExternalDataService in your Fragment
@Priority(10)
public class Win32ExternalDataService extends AbstractService implements IExternalDataService{
  public String ping(){
    return "pong";
  }
}


4. Now create a new Folder in your Fragment named "lib".

5. Add all jars of your external tool to that lib Folder.

6. Double click on the fragment.xml to open it. Go to the "Runtime" tab.

7. On the right side in the Classpath section click the "Add..." button to add the newly added jars to the Fragment classpath.

8. Now Register the new Service in the "Extensions" tab. Or open the "fragment.xml" tab and add something like
  <extension
        point="org.eclipse.scout.service.services">
     <service
           class="com.bsiag.crm.sampledata.Service1"
           createImmediately="false">
     </service>
  </extension>


9. add the new Fragment to your product configuration (dependencies) and start the Server.
9. now you are done.
Re: [Help] How to run external application same time as server runnig [message #1059831 is a reply to message #1059460] Tue, 21 May 2013 19:06 Go to previous messageGo to next message
Matthias Zimmermann is currently offline Matthias ZimmermannFriend
Messages: 208
Registered: June 2015
Senior Member
In the Scout SDK there is a wizard called "Add new Library Bundle" that probably will do what you need. Have a look at this step of the corresponding Wiki tutorial.

If you need your libraries (set of JAR files) available on the server side, just start the Scout wizard on the Library Folder under the blue server node of your Scout application.
Re: [Help] How to run external application same time as server runnig [message #1060284 is a reply to message #1059831] Thu, 23 May 2013 21:03 Go to previous messageGo to next message
Err Adil is currently offline Err AdilFriend
Messages: 3
Registered: May 2013
Junior Member
thank you Matthias Zimmermann problem was resolved by Ivan Motsch thank you Smile
Re: [Help] How to run external application same time as server runnig [message #1060285 is a reply to message #1060284] Thu, 23 May 2013 21:13 Go to previous message
Err Adil is currently offline Err AdilFriend
Messages: 3
Registered: May 2013
Junior Member
I followed your tutorial Ivan Motsch
and in the class ServerApplication where is in the server bundel, i put this code in the method start()

    SERVICES.getService(IExternalDataService.class).startJadex();

with startJadex() is the method which i start my external application
** My question is : if is it the good way to invok other services in scout ??

[Updated on: Thu, 23 May 2013 21:15]

Report message to a moderator

Previous Topic:How to customize the Rayo Look&Feel?
Next Topic:Error when using External plugin
Goto Forum:
  


Current Time: Wed Apr 24 19:09:07 GMT 2024

Powered by FUDForum. Page generated in 0.03718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top