Archív kategorie 'English'

Groovy – making existing objects refreshable

Sunday, November 29th, 2009

In the last post I described the basic principles I found behind the scenes of GroovyScript refresh. Now imagine that you want to create your own long living Groovy instances with auto-refresh behaviour when source code changes. You can use out-of-the-box Spring support – but there are some limitations I stated in the previous article.

In this post I am going to present an alternative solution that addresses some of the painful issues I noticed. As I stated before, key is to wrap the reference to Groovy instance into an another object managed by the Java class loader and that is exactly the main point of the solution presented.

(more…)

The secret of Groovy script refresh

Sunday, November 8th, 2009

The first thing one should undestand before he tries to integrate scripting support into his application / framework are class loading issues. One of the main reasons (next to the ability to easily switch from Java) why we have chosen Groovy as our primary scripting language is very good support for live refresh of Groovy classes when source file has changed. But what does Groovy exactly do when it “refreshes” its loaded classes to conform to a newly modified source file? What about existing instances referencing to this class? Is it even possible in JVM to change class structure in runtime? Yes JavaRebel can do this, but it needs special setup and debug mode for hotswap. And how does all this fit into the existing Spring support? From the documentation it seems, that it all just magically works! Dozens of questions ran in my mind when I started to strive for Groovy integration in our product. Those questions gets answered in this article.

(more…)

iBatis 3 is alive!

Monday, February 9th, 2009

I had a discussion with Jira recently, whether we could be still looking forward to iBatis 3. It has been long time since iBatis 3 Whiteboard was seriously touched and I haven’t found any other clue when or whether there is going to be iBatis 3. There is very small activity for 3.x version in Jira, though there were some commits into iBatis 3 core. As I am going to have a speech in University Hradec Králové on iBatis, I have decided to ask directly its authors about this issue.

(more…)

MySQL temporary tables inside Transaction
and the magic of implicit commit

Saturday, August 23rd, 2008

I’ve run into interesting and very strange problem. I was writing transactional Spring test that opens transaction at the beginning of it, and rollbacks at the end. First part of my test performed bunch of INSERT and UPDATE SQL commands and after that I was checking persisted changes by loading data back from the database. Suddenly my tests started to fail. And I was searching for the reason …

(more…)

Teamcity & CVS & Maven: release on server

Saturday, June 28th, 2008

If you use Maven 2 and Teamcity integration server, you might want to perform releases on server. Although it’s not so complicated, some things must fit one into another and you might spend a lot of time till you find out how to configure pom.xml and build configuration. For those of you, who need to setup it, this article could come quite handy.

(more…)

Jak bylo na školení NetBeans Platform

Saturday, March 8th, 2008

English translation

Tímto příspěvkem bych chtěl poděkovat pánům ze Sun Microsystems za uspořádání tohoto školení. Přestože mým oborem jsou výhradně server side aplikace, rád jsem si rozšířil obzory v oblasti desktopu. Z tohoto důvodu se z mé strany pravděpodobně nedočkají významné kontribuce, a proto se snažím jim námahu vrátit alespoň touto reklamou na jejich edukační program.

(more…)

Running AJAX with jQuery in Stripes Framework

Friday, January 25th, 2008
Though most of articles at this blog are written in my native language – Czech, this one will be different. I have chosen an English to address wider community of Stripes developers – I think there would’nt be enough readers in our beautiful small country. So, please, excuse possible errors and mistakes in the article, I will try my best :-) .

Common introduction to AJAX in Stripes

Stripes framework offers basic but sufficient support for AJAX that is covered with article at official web site. Article recommends using commonly known PrototypeJS AJAX client side library. On the server side, request is processed by Stripes themselves by standard population and execution as any other http request (that means that data from client to server are sent as a standard URL encoded parameters). What you get is correctly populated and validated action bean – and until now you haven’t even recognize, that request is made by JavaScript on the client side not even you have to care of it. You can access session, exchange cookies and so on.

(more…)