User login

Any faster development cycle?

Forums :

Hi,

A simple question: using the standalone wso2 app server, is it possible to test a data service, make a modification in the code and see the result without restarting the app server? A kind of reloading function. I tried deactivate and activate but it does not reload the lib.

Thanks for your answer.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Do this change in your axis2.xml

Hi,

I think what your looking for is hot-deploymnt (re deploying the data service when a change is made to it). This can be achieved by making the folling change in your axis2.xml (which is located in the conf directory).

<parameter name="hotdeployment">true</parameter>

This parameter is set to false by default.

Thanks,

Keith.

http://www.keith-chapman.org

 

Change done

hotdeployment was set to true
I changed hotupdate to true too.

No luck. Maybe it works when you change the xml file (did not try) but this does not help me here.

The problem is probably due to the location of the added jar (named lidi.jar) - where the stored procedures are kept. The changes I would like to see hotdeployed are in the lidi.jar. This is probably more an issue of database and class loading. Using H2, the jar file where are the stored procedure - lidi.jar - must be in the classpath of the h2.jar - and the h2.jar must be in the classpath of lidi.jar (for some specific reasons - like being able to return a resultset from a stored procedure). So the only location that seems to work is in the lib directory of wso2.

Thanks,

Patrice

Hot update feature enabling

Hi, Patrice,





To enable the hot update feature, one should use the "hotupdate" parameter (and not the "hotdeployment" one!), setting it to true.

The config file (axis2.xml) excerpt looks like this:

<axisconfig name="AxisJava2.0">

    <parameter name="hotdeployment">true</parameter>

    <parameter name="hotupdate"><!-- false -->true</parameter> <!-- this will enable the hot update! -->

    <parameter name="enableMTOM">false</parameter>

    <!-- [...] -->

</axisconfig>




From what I remember (I don't have a WSAS installation near at hand in this moment), the "hotdeployment" parameter defaults to true, anyway; but it means only that the server will accept hot [un]deployments, that is it will monitor for new appearances / disappearances of AXIS2 archives -- but not  for changes within an already existing (deployed) aar file!

To make the AXIS2 server redeploy a new version of the same archive, set the "hotupdate" parameter to true (and leave the "hotdeployment" one to its default true value, too).

One more important note is that this monitoring features apply only to the repository/services directory! That means that only the "work" archives deployed to the AXIS2/WSAS server will benefit of that regime. The built-in libs are reloaded only on the server restart (at least from what I observed)! So, placing your libraries in the server /lib directory it's not a choice (neither a recommendable thing, maybe).



Unfortunately, I don't know to advise you regarding the mutual classpath presence of those 2 libs (your work, lidi.jar, and the H2 provided jar, h2.jar). A more "normal" situation was that only your work lib, lidi.jar, should necessitate the presence of the DB provider jar (in your case, h2.jar). If that would be the case, placing both of them in the lib subdirectory of your aar file should do the work.



Best regards,

    Emil Prager

aar file - maybe the solution?

Hello Emil,

Your solution might be "the solution". The question: how to make a aar file? I do not need it for now: only the dbs file and those 2 jars that I put in the lib directory at this time.

I would be very grateful if this works. I would only need to automate the process or doing the aar file in an ant file. I already use an ant file to create the jar and put it in the lib dir. Any clues on creating an aar file with an ant build file?

Thanks,

Patrice

Hi pdrolet & Emil, Data

Hi pdrolet & Emil,

Data Services does not support creating a aar file right now. (But we might add this feature in the near future. I am already working on getting a service.xml in place). So the approach suggested by Emil does not work.

pdrolet,

Are you using Java stored procedures?

Thanks

/sumedha

Java stroed procedure

Hello,

Yes, I am using stored procedures with H2. It allows me to change from the axis1 model to axis2 with very little effort (I will have to change the client too, but this was planned anyway). It is so easy to create a new endpoint with data web service!

So with the 'service.xml' that you are working on, do you think that would allow reloading the classes of the stored procedure? I use H2 embedded. Do you think that putting h2.jar and lidi.jar in the lib dir of the "'future" aar would work as it is right now but allowing hotdeployement? With H2, the stored procedure has to be in the same folder as the H2 jar.

Thanks,

Patrice

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.