Webservice Not taking latest changes after import

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Webservice Not taking latest changes after import

Postby jd2p » Wed Sep 26, 2012 7:09 pm

I have a Webservice running and when I import a solution that contains new changes, the webservice keeps behaving as in the previous version even though I select 'activate after import' and then manually clic on 'Activate'. The import shows no errors and a new Active Release number is displayed in the Application Server.

However, if I delete the solution, restart Application Server an then import the same solution, it does take the latest changes. What could be happening? This is a very pressing issue for us since we have a service in production, I'd really appreciate the input.

Also, when importing I already tried:
1. Selecting "Merge solution if revision information is available, and when a merge conflict arises use: import version
as well as
2. Do not merge solution, with the following two selected:
overwrite repository forms with import version
delete repository forms which do not exist in import version

We're using Servoy version 6.0.5 -build 1230

Thanks in advance
jd2p
 
Posts: 95
Joined: Thu Dec 08, 2011 1:08 am

Re: Webservice Not taking latest changes after import

Postby Harjo » Wed Sep 26, 2012 9:54 pm

Try to close the client in the servoy-admin page after you imported the new version
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Webservice Not taking latest changes after import

Postby jd2p » Thu Sep 27, 2012 1:09 am

Harjo, I think the problem is related to that.. since its a WebService, it gets called from several different places. However, the Application Server always displays the same client which happens to be the same server where it resides. I mean, the IP address that shows up is the server's, it doesnt distinguish between clients and therefore apparently clients never get disconnected in order to mind the changes next time they connect. If I could identify from where the client is connecting to the webservice I can give priority to which close down manually. Am I clear? Please let me know if I'm not.

Thanks,
jd2p
 
Posts: 95
Joined: Thu Dec 08, 2011 1:08 am

Re: Webservice Not taking latest changes after import

Postby ptalbot » Thu Sep 27, 2012 2:47 am

Doesn't matter: kill then all ;) At least that what you would do with Velocity web services and it would work just fine, creating new ones as new requests come in.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Webservice Not taking latest changes after import

Postby jd2p » Thu Sep 27, 2012 4:45 pm

Hahaha! Thanks Patrick, it makes sense, I'll do that.
jd2p
 
Posts: 95
Joined: Thu Dec 08, 2011 1:08 am

Re: Webservice Not taking latest changes after import

Postby rgansevles » Fri Sep 28, 2012 10:11 am

jd2p,

The reason that restws plugin keeps using the old code is because it does not create a client for each request, but it uses a pool of clients.
A kill of the clients or a server restart clears that so for new requests new clients are created that use the new code.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: Webservice Not taking latest changes after import

Postby ptalbot » Fri Sep 28, 2012 3:53 pm

Yes the pool stays open with restws plugin, up to the number of client you have specified (by default it's 5).

In Velocity, you can choose your poison: either one headless for all the clients, a pool like the restws plugin, or one client per http session.
Best of all, you can specify that PER solutions!

Note that the headless will automatically be wiped out in headless and session after the session times out (the client didn't query the server for a period of time, which is set by the session-timeout value in /application_server/server/conf/web.xml. By default, this is 30 minutes, like this:
<session-config>
<session-timeout>30</session-timeout>
</session-config>
(You can set this to a lower value too for a server with short lived web services clients)
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Webservice Not taking latest changes after import

Postby jd2p » Fri Sep 28, 2012 9:30 pm

Awesome, thanks for the replies, there's stuff I didnt know about! Also Patrick, I thought Velocity was for reporting and building layouts, what's it relation with headless clients?
jd2p
 
Posts: 95
Joined: Thu Dec 08, 2011 1:08 am

Re: Webservice Not taking latest changes after import

Postby ptalbot » Fri Sep 28, 2012 9:50 pm

VelocityReport is for reporting. Velocity (which is a sub plugin of VelocityReport and part of the same jar) is a new breed of WebClient, which allows you to build web pages as well as web services. It share with VelocityReport the same wrapping engine, and the Velocity templating engine, which allows you to produce web pages amongst other things. And it also shares one thing with VelocityReport: it's quick as hell! ;)

Have a look here:
https://www.servoyforge.net/projects/ve ... /WebClient
You can also consult the PDF of my presentation at Servoy World that will give you a quick overview:
https://www.servoyforge.net/attachments ... locity.pdf
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Webservice Not taking latest changes after import

Postby jd2p » Sat Sep 29, 2012 2:34 am

That sounds awesome, we tried once using Velocity Reports and failed because we didn't get a good grip of how to do the templating and since we were short on time we switched back to Jasper. However, I have seen the cool UI we could build and have heard about how fast it is. Now that you mention a WebClient and the ability to build web services... well it just seems there's too much we're missing out on. Are there any videos resources you could point me to?

ps- sorry for getting somewhat off topic!
jd2p
 
Posts: 95
Joined: Thu Dec 08, 2011 1:08 am

Re: Webservice Not taking latest changes after import

Postby ptalbot » Sat Sep 29, 2012 2:54 am

Well the templating is really HTML, a good web designer could have helped. But in Servoy it's really extremely simple: you use Servoy as you usually do, working with foundsets, datasets, objects of all sorts, put them in an object and there you are!
The same goes for building web sites and web services.

I don't have videos, sorry. I can arrange some screen share sessions if you want, to show you around...
Send me a PM and I'll give you all my coordinates.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Webservice Not taking latest changes after import

Postby ROCLASI » Sat Sep 29, 2012 10:36 pm

To be more precise, Velocity Report templating is XHTML. An important distinction.
But yes, just throw all your data objects in an JavaScript object and pass that and your template can access it. That is the beauty of (Apache) Velocity.

Of course when you use Velocity Webclient you can use any format you want.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Webservice Not taking latest changes after import

Postby ptalbot » Sat Sep 29, 2012 10:51 pm

Well, XHTML is just well formed HTML anyway, meaning all tags must be properly closed.

For example you cannot use <br> but <br/> and not <img src="..."> but <img src="..."/> or <img src="..."></img>, so a simple clean up of these improperly build tags will give you XHTML.

And any HTML editor nowadays will create proper XHTML.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 6 guests