Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » Dedicated service call(Service does not end?)
Dedicated service call [message #894370] Sun, 08 July 2012 15:44 Go to next message
Nathan Reed is currently offline Nathan Reed
Messages: 74
Registered: June 2012
Member
Windows XP
EDT 0.8.0
RichUI
Dedicated Service

I have ported some code from RBD. It uses a dedicated service to access data from MySQL.

After modifying the service and the service function calls it works somewhat. In debug I note that the service program does not perform as it did in RBD. The service continues to run.

My access to the DB is working and data is returned. Subsequent calls work somewhat but it creates a mess.

I set up a simple test with no DB to isolate the issue shown below. When run in debug this test results in the data being returned to the RichUI but the service continues to run.

Can anyone spot what I am doing wrong? Are there other changes I need to make for RBD migration?

Thx,

Nathan Reed

// Dedicated Service

package server;

import common.Error;

// service
service testservice
	
	NoErrorRecord error;
	
	function testfunction(stuffin string in) returns ( error )
		NoErrorRecord.severity = 0;
		NoErrorRecord.message = "Data Returned ";
		return(NoErrorRecord);
	end
end


// RichUI

handler testcall type RUIhandler{initialUI =[ui
            ], onConstructionFunction = start, cssFile = "css/CuttingInstructions.css", title = "testcall"}

	dbService testservice?;
	dedicatedServiceBinding HTTPProxy;

	errorin error;
	errorBack error;
	testdata string;

    ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children =[]};

    function start()
    	call dbService.testfunction( testdata ) 
			using new HTTPProxy
			returning to testcallback
			onexception allException;
		hereNow string = "";		
    end
    
    function testCallBack( ErrorRecord Error in )
		errorBack = errorRecord;
		testline int = 1;
	end	// End function
	
	function allException(ae AnyException in);
		workfield int = 1;
	end // End function
end
Re: Dedicated service call [message #894382 is a reply to message #894370] Sun, 08 July 2012 22:26 Go to previous messageGo to next message
Dan Darnell is currently offline Dan Darnell
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member
When you say "the service continues to run" what do you mean? Is it that you see the service thread staying active? If so, that is by design. In EDT the service invocations are done in such a way that the internal (Java) application server keeps running. This is more "real world" than the implementation in RBD where, in debug, each service invocation fires up a Java process. The EDT way should actually be working better for you than the RBD way. What problems are you encountering with database access in your application?

--Dan
Re: Dedicated service call [message #894383 is a reply to message #894382] Sun, 08 July 2012 22:29 Go to previous messageGo to next message
Dan Darnell is currently offline Dan Darnell
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member
Notes on the way EDT supports debugging:

http://wiki.eclipse.org/EDT:The_Differences_between_EDT_0.7.0_and_RBD#Debugging

"As a result of the change from an interpretive debugger to one that runs generated code, it was necessary to add a new Test Server to the IDE, which is capable of running EGL Services that have not yet been deployed. Having an IDE Test Server provides two additional benefits; 1) response time for services that have not yet been deployed should be greatly improved, since a service does not have to be terminated once it has been started, unless a change is made that cannot be managed by the VM's hot swapping framework, and 2) EGL Libraries that require a J2EE context will now work as expected when being debugged."
Re: Dedicated service call [message #894467 is a reply to message #894383] Mon, 09 July 2012 06:55 Go to previous message
Nathan Reed is currently offline Nathan Reed
Messages: 74
Registered: June 2012
Member
Dan:

Ignorance of preview/debug in EDT combined with unrelated problem had me lost.

My app has a RichUI part that controls several others via infobus. When I first bring up preview (no service running) the service starts but the RichUI never shows any data. I then went to debug to discover the problem etc. and the difference in service activity had me lost. My stupid.

Now when I bring up a fresh instance of preview I see the service start and I still get no data. I refresh (had not done that before) and the app then works as expected.

Also when I bring up fresh instance of app in preview and get no data if I then request external browser the app works as expected in the external browser.

When I request an actual debug session with no break points the app comes up first time with expected data and works as expected.

Based on this I assume this lack of initial data to the richui panel on initial preview must be a quirk or circumstance of the preview mode?

Will install server and test deployed before migrating more to make sure I do not have issue with my approach.

Thx for pushing me off dead center.

Nathan Reed
Previous Topic:JavascriptGen error in Handler when ref server
Next Topic:Validators error
Goto Forum:
  


Current Time: Thu Aug 28 03:26:22 EDT 2014

Powered by FUDForum. Page generated in 0.01798 seconds