Page 1 of 2

Does automatic data update work with batch changes?

PostPosted: Thu Jul 02, 2009 4:50 pm
by CBruce
Just starting with Servoy and wondering if client data gets automatically updated even when a batch process updates data in the database?

CB

Re: Does automatic data update work with batch changes?

PostPosted: Thu Jul 02, 2009 4:55 pm
by ROCLASI
Hi CB (Bruce?),

First let me say welcome to the forum and the world of Servoy!

The batchprocessor is just another (headless) Servoy client so any changes it makes to the data it will broadcast to the other connected clients.
So the short answer is Yes.

Hope this helps.

Re: Does automatic data update work with batch changes?

PostPosted: Thu Jul 02, 2009 6:21 pm
by martinh
Good question, because so far I didn't see databroadcasting working for records changed by a batchprocessor

Re: Does automatic data update work with batch changes?

PostPosted: Fri Jul 03, 2009 2:49 pm
by ROCLASI
martinh wrote:Good question, because so far I didn't see databroadcasting working for records changed by a batchprocessor


Did you file a bugreport ?

Re: Does automatic data update work with batch changes?

PostPosted: Fri Jul 03, 2009 2:52 pm
by kazar
martinh wrote:Good question, because so far I didn't see databroadcasting working for records changed by a batchprocessor


I haven't noticed complaints about that (but haven't always read these forums religiously). But I would think if this were true in all versions - that updates run by a headless client are not broadcast - it would be more commonly known (and discussed).

So, Martin ... have you found this to be true with all versions, or specific version(s)? And ditto Robert's q, is there a case open...

kazar

Re: Does automatic data update work with batch changes?

PostPosted: Fri Jul 03, 2009 3:01 pm
by kazar
martinh wrote:Good question, because so far I didn't see databroadcasting working for records changed by a batchprocessor


ah, I see you begin to answer your own problem here.

Perhaps best to refrain from posting that broad statement again until & unless it is proven to be true after you finish investigating other problems you may have with your database or server setup.

Re: Does automatic data update work with batch changes?

PostPosted: Fri Jul 03, 2009 5:08 pm
by martinh
I' am watching a record on my screen.

I know that the record that I'm looking at has been changed, but client doesn't show me the change

00:00:000 1 00:00:000 Update update interface_session set session_status=?, process_order=?, interface_type_id=? where interface_session_id = ?

And there is only 1 record in the table, so I'm definitively watching the correct record.

When I restart the smart client, then I see the changes that were made by the batch processor.

So Does automatic data update work with batch changes?, I have to reply with no (sorry)

Re: Does automatic data update work with batch changes?

PostPosted: Fri Jul 03, 2009 6:49 pm
by Jan Aleman
How does the code look like in your batchprocessor? If you're using rawsql it obviously doesn't broadcast, this is well documented.

Re: Does automatic data update work with batch changes?

PostPosted: Sun Jul 05, 2009 11:14 pm
by martinh
Jan,

My coding uses foundsets. I know that rawSQL doesn't work with broadcasting.
The way of coding is exactly the same as in a normal dataentry program.

So with transactions, and saveData() calls

Martin

Re: Does automatic data update work with batch changes?

PostPosted: Sun Jul 05, 2009 11:49 pm
by ROCLASI
Hi Martin,

I suggest you make a sample solution that shows this behavior and file it with a bugreport. Databroadcasting with batchprocessors should normally work.

Re: Does automatic data update work with batch changes?

PostPosted: Mon Jul 06, 2009 9:53 am
by mboegem
Hi Martin,

just to make sure: client and batchprocess are running from the same application server instance?

Re: Does automatic data update work with batch changes?

PostPosted: Mon Jul 06, 2009 10:11 am
by martinh
mboegem wrote:just to make sure: client and batchprocess are running from the same application server instance?


Yes, I'm sure about that.

I'm not so familiar with all network stuff and about ports, but from what I've understood, I should have a different RMI-port for each server I can connect to.
So my internal server uses RMI-port 1103
Maybe batchprocessor takes standard 1099?
When 2 different smart clients are connecting, I see databroadcasting working (now in 4.1.3, in 3.5. I didn't succeed to make this work), so in the base it is working.

networksettings.JPG
networksettings.JPG (62 KiB) Viewed 8389 times

Re: Does automatic data update work with batch changes?

PostPosted: Mon Jul 06, 2009 10:43 am
by ROCLASI
Again, the batchprocessor is just a (headless) client so it uses the same network settings as any other clients. If you can connect to it with a SC/WC then the batchprocessor should work fine too.
Also are you using more than one named connection to the same database ? This was allowed in older versions of Servoy but since these are considered 2 different connections (although using the exact same database) the broadcasting won't work between those connections.

Re: Does automatic data update work with batch changes?

PostPosted: Mon Jul 06, 2009 10:51 am
by martinh
ROCLASI wrote:Also are you using more than one named connection to the same database ? This was allowed in older versions of Servoy but since these are considered 2 different connections (although using the exact same database) the broadcasting won't work between those connections.


Robert,

Do you mean with that?

Databaseservername A connects to jdbc:jtds:sqlserver://SERVOY/example_data
Databaseservername B connects also to jdbc:jtds:sqlserver://SERVOY/example_data

In that case, this is not the case, because Servoy doesn't allow me (never had)

But I do have switch server, but that is in my smart client also the case.

Re: Does automatic data update work with batch changes?

PostPosted: Sat Jul 11, 2009 9:37 pm
by amcgilly
version 4.1.3
Java 1.6
Sybase ASA 10

I too am finding that certain changes made by one batch process are not being broadcast properly to other batch processors and clients, and vice versa (i.e. changes made in smart client aren't always being seen by a batch process). Seems to apply specifically to record modifications, not record insertions. Here's what's happening:

client A changes record R, placing value V in column C
client B creates a foundset using a relation which contains a global condition globals.constant_V = C

This condition fails for the record that client A just modified, and the record is therefore excluded from the foundset. What is odd is that if client B builds and displays a foundset using a relation that does NOT include this condition, then the modified record appears, correctly showing value V in column C!

I've submitted this issue description to the support system.