JRebel manages the updates while adding new changes to a simple RESTEasy application: adding new resource using the JAX-RS annotations and adding new Java code to the application. No re-deploy phase required.
Thursday, August 26, 2010
Tuesday, August 24, 2010
RESTEasy. rest, easy.
I've spent some days figuring out how does RESTEasy initializes itself. The goal, which came actually from a support case, was to hook into the framework and make it possible to add new resources with @Path annotation without re-deploying the application itself.
It turned out that as RESTEasy has 3 main options for bootstrapping: servlet (which actually has a plenty of configuration switches), listener, and filter. This is quite important as RESTEasy initializes itself a little bit differently depending on what kind of configuration is provided.
I've managed to patch the internals of RESTEasy in a way, so that in case of "servlet" bootstrapping, when adding a new resource to the application, the new context path appeared instantly, without re-deploying the application.
For a demo, I used the 'jaxb-json' example that is bundled with RESTEasy distribution. By default, the example uses listener bootstrapping configuration, thus web.xml has to be modified a little bit to use 'servlet' configuration instead:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/resteasy</param-value>
</context-param>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application>
<param-value>org.jboss.resteasy.examples.service.LibraryApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/resteasy/*</url-pattern>
</servlet-mapping>
</web-app>
Next, run the application, and see that localhost:8080/resteasy/library/books/badger responds as intended for the given example. Now, if we use JRebel to make the class re-loading possible, and patch some classes of RESTEasy framework, one will be able to add new methods to the resource class without having to re-deploy the application. Say, I've added a new method to the class, and marked it with the @Path annotation:
So now I could go to localhost:8080/resteasy/library/books/test and see the changes instantly! Hopefully we can add this feature to support all kinds of RESTEasy configurations. The feature will be available quite soon in one of the upcoming JRebel nightly builds.
It turned out that as RESTEasy has 3 main options for bootstrapping: servlet (which actually has a plenty of configuration switches), listener, and filter. This is quite important as RESTEasy initializes itself a little bit differently depending on what kind of configuration is provided.
I've managed to patch the internals of RESTEasy in a way, so that in case of "servlet" bootstrapping, when adding a new resource to the application, the new context path appeared instantly, without re-deploying the application.
For a demo, I used the 'jaxb-json' example that is bundled with RESTEasy distribution. By default, the example uses listener bootstrapping configuration, thus web.xml has to be modified a little bit to use 'servlet' configuration instead:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/resteasy</param-value>
</context-param>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application>
<param-value>org.jboss.resteasy.examples.service.LibraryApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/resteasy/*</url-pattern>
</servlet-mapping>
</web-app>
Next, run the application, and see that localhost:8080/resteasy/library/books/badger responds as intended for the given example. Now, if we use JRebel to make the class re-loading possible, and patch some classes of RESTEasy framework, one will be able to add new methods to the resource class without having to re-deploy the application. Say, I've added a new method to the class, and marked it with the @Path annotation:
@Path("library")
public class Library {...
@GET
@Path("books/test")
@Produces("text/html")
public String getTest() throws Exception {
return "my test";
}...
}
So now I could go to localhost:8080/resteasy/library/books/test and see the changes instantly! Hopefully we can add this feature to support all kinds of RESTEasy configurations. The feature will be available quite soon in one of the upcoming JRebel nightly builds.
Wednesday, August 11, 2010
Having fun with Grails and JRebel
Gails is a fun framework to work with. Recently, I had to figure out how "dynamic" the framework is.
BTW, IntelliJ IDEA Grails support just rocks!
One thing that is definitely useful - to tell Grails not to re-deploy the application after a new change has been introduced. You can do that by adding -Ddisable.auto.recompile=true to VM parameters of your application start script.
By default, controllers and service classes are initialized dynamically by Grails, but with the option above enabled it lets you to skip the re-deploy phase. Re-deploy of the application is required once you change Java classes, which may be included in your Grails application - this will be solved using JRebel as you will see below. Let's see a small example for that.
1) Create a new controller, called ActionController (grails create-controller action), which will delegate its calls to a service, HelloService (grails create-service hello), which will just return a string:
ActionController.groovy
class ActionController {
def helloService
def helloAction = {
render(helloService.serviceMethod(params.name))
}
}
ActionController.groovy
class DummyController {
def index = {
render(jr.util.Util.value())
}
}
public class Util {
public static String value(){
return "hello";
}
}
Unfortunately this trick doesn't work for all cases in Grails. For instance, for CRUD functionality in Grails application, if a change is made on a domain class, JRebel will reload the classes, but the change is not propagated further to the view because of some magic that Grails does behind the scenes. The good news is that JRebel support for Grails is still in progress. Stay tuned! :)
BTW, IntelliJ IDEA Grails support just rocks!
One thing that is definitely useful - to tell Grails not to re-deploy the application after a new change has been introduced. You can do that by adding -Ddisable.auto.recompile=true to VM parameters of your application start script.
By default, controllers and service classes are initialized dynamically by Grails, but with the option above enabled it lets you to skip the re-deploy phase. Re-deploy of the application is required once you change Java classes, which may be included in your Grails application - this will be solved using JRebel as you will see below. Let's see a small example for that.
1) Create a new controller, called ActionController (grails create-controller action), which will delegate its calls to a service, HelloService (grails create-service hello), which will just return a string:
ActionController.groovy
class ActionController {
def helloService
def helloAction = {
render(helloService.serviceMethod(params.name))
}
}
HelloService.groovy
class HelloService {
def String serviceMethod(String name) {
return "hello ${name}!"
}
}
HelloService is injected to the ActionController by convention. Run the Grails app with grails -Ddisable.auto.recompile=true run-app or from IDE as shown above. ActionController.helloAction is the entry point for our application:
It tells now "hello Anton!"
Let's add another service to the application. Say, it will be GoodbyeService (grails create-service goodbye):
GoodbyeService.groovy
class GoodbyeService {
def String serviceMethod(String name) {
return "bye ${name}!"
}
}
... and change the ActionController accordingly:
ActionController.groovy
class ActionController {
def helloService
def goodbyeService
def helloAction = {
render(helloService.serviceMethod(params.name))
}
def goodbyeAction = {
render(goodbyeService.serviceMethod(params.name))
}
}
So without any restart/redeploy phase, http://localhost:8080/jr-grails/action/goodbyeAction?name=Anton tells me "bye Anton!"
Perfect! I'm productive! :)
Now try another example, including some Java sources from within the application. For instance, we have a DummyController which delegates the calls to Util class instead of a Grails service.
DummyController.groovy
class DummyController {
def index = {
render(jr.util.Util.value())
}
}
Util.java
public class Util {
public static String value(){
return "hello";
}
}
http://localhost:8080/jr-grails/dummy now gives "hello" in response.
The problem is that if you make some changes in the Util class and recompile it, the change will not be visible in the application. To see the changes, you would need to redeploy the application which may require some time once you have a more sophisticated application.
JRebel to the rescue!
JRebel will help you with the issue above. Once you download and install the software, it is possible to start the application from your favorite IDE (via dedicated plug-in) or by adding special parameters to the application start script: -javaagent:"jrebel.jar"
Now if you run the example (see above), and after it is started, try making some changes to the Util class (for instance, change "hello" to "goodbye"). Hit F5 and the corresponding change will be visible now. The console will also display a message - JRebel: Reloading class 'jr.util.Util' - meaning that JRebel has noticed that the class has been altered and you want to use it in your application.
The problem is that if you make some changes in the Util class and recompile it, the change will not be visible in the application. To see the changes, you would need to redeploy the application which may require some time once you have a more sophisticated application.
JRebel to the rescue!
JRebel will help you with the issue above. Once you download and install the software, it is possible to start the application from your favorite IDE (via dedicated plug-in) or by adding special parameters to the application start script: -javaagent:"jrebel.jar"
Now if you run the example (see above), and after it is started, try making some changes to the Util class (for instance, change "hello" to "goodbye"). Hit F5 and the corresponding change will be visible now. The console will also display a message - JRebel: Reloading class 'jr.util.Util' - meaning that JRebel has noticed that the class has been altered and you want to use it in your application.
Unfortunately this trick doesn't work for all cases in Grails. For instance, for CRUD functionality in Grails application, if a change is made on a domain class, JRebel will reload the classes, but the change is not propagated further to the view because of some magic that Grails does behind the scenes. The good news is that JRebel support for Grails is still in progress. Stay tuned! :)
Friday, June 4, 2010
JAZOON 2010, Day 3
The 3rd day at JAZOON 2010 had plenty of good talks in the schedule. The day started with a keynote "The Gaia satellite and Data Processing" by William O'Mullane from ESAC.
The main topic of the keynote was about the issues related to the establishment of a satellite carrying a giant telescope, Gaia. He also mentioned that ESAC uses Java for data processing almost exclusively since 2000. Only some scientific numerical calculations are still implemented in Fortran.
From the standpoint of performance, they find the fact that Java is faster than C for an equivalent code, thanks to JIT on an Intel processor. (see the slide photo below) This claim was even noted at DZone.
The limitations of Java that William noted were:
* "Java is not the tracer bullet"
* too little math libraries maintained (the best being ApacheCommon Math)
* poor IEEE standards compliance
The next talk I attended was about Abacus Formula Compiler by Peter Arrenbrecht. The Abacus Formula Compiler is a Java library that enables you to build a spreadsheet functionality into you Java application. It works best if the spreadsheet contains the values and formulas only. Unfortunately it cannot deal with VBA macros. But still, it provides quite a natural way to embed integrate Java with the spreadsheets.
After that I've listened a presentation about portal evolution in Credit Suisse. A brand new version of the bank's intranet portal was introduced, which they call Intranet 2.0. The idea was that Credit Suisse has many different applications internally and they wanted to put the into one place, so that the customer relationship managers should not log into several applications to serve one client, and also have the personalized views for different type of employees. They used WSRP portlets to integrate the external applications and implemented ~25 portlets for the additional functionality.
To serve the clients they have deployed the portal onto a 16-node-large cluster co-located in 2 data centers. Whatta waste! Banks just don't get it - portal is a wrong way to go! But ok, they have plenty of money for that, so who cares. And architecture compliance is aways so important to such types of companies.
The funniest thing was that the presenter was using a bank's laptop to present the content and it was permanently trying to re-establish the VPN connection :) These bank's security things are just killing me - there should be something better than this.
The next talk was a pretty fair comparison of JSF and Tapestry by Igor Drobiazko. He presented plenty of examples for both, JSF and Tapestry 5, noting the new things in both and stating the pros and cons while explaining why something is done the way it is done. Good presentation especially as I know Igor had his first presentation in front of such a large audience.
One nice example he showed was about reloading the changes by Tapestry on the fly without rebooting or redeploying the entire application, just like JRebel does. Tapestry can to the reloading for almost everything that is included as a source and implemented "the Tapestry way". Unfortunately this mechanism cannot be used as a standalone library for other applications.
DSL construction with xText was quite interesting, and the slides are already uploaded to Slideshare. xText is used to construct external DSLs as opposed to the approach that Neal Ford presented on the very first day. Previously I was really skeptical about the model-driven approach that xText is promoting, the presentation showed that it is still quite reasonable, especially as xText is heavily relying to ANTLR for grammar construction.
Spring Roo presentation by Eberhard Wolf was a live coding show. Very pleasant! He showed how to get started with Spring Roo, what the tool generates and how it can be altered. Roo (and also many other frameworks) has taken the approach advocated by rails actually - it provides the means for generating the code quickly with assisting the developer while creating the application. The difference is that Spring Roo doesn't enforce any additional runtime dependencies to the resulting application, and also it relies heavily on AspectJ aspects to alter the behavior of Java classes.
The last presentation I attended was about JSF portlet bridge, the brand new standard to integrate JSR168 and JSR286 with JSF1.2. I'm still not convinced that these standards are the right way to go. The portlet/portals approach looks like a very much vendor-driven and doesn't advocate lightweight development model. I know I'm becoming an anti-evangelist of portals but I jsut cannot see any benefit from this technology... unless until someone convinces me that there's no viable alternative.
So now JAZOON 2010 is over. Very good content, well-prepared presenters, lots of networking, very delicious food, awesome location (yes I like Zurich very much). I should have tried to submit a talk to the conference, probably will do that sooner or later.
The main topic of the keynote was about the issues related to the establishment of a satellite carrying a giant telescope, Gaia. He also mentioned that ESAC uses Java for data processing almost exclusively since 2000. Only some scientific numerical calculations are still implemented in Fortran.
From the standpoint of performance, they find the fact that Java is faster than C for an equivalent code, thanks to JIT on an Intel processor. (see the slide photo below) This claim was even noted at DZone.
The limitations of Java that William noted were:
* "Java is not the tracer bullet"
* too little math libraries maintained (the best being ApacheCommon Math)
* poor IEEE standards compliance
The next talk I attended was about Abacus Formula Compiler by Peter Arrenbrecht. The Abacus Formula Compiler is a Java library that enables you to build a spreadsheet functionality into you Java application. It works best if the spreadsheet contains the values and formulas only. Unfortunately it cannot deal with VBA macros. But still, it provides quite a natural way to embed integrate Java with the spreadsheets.
After that I've listened a presentation about portal evolution in Credit Suisse. A brand new version of the bank's intranet portal was introduced, which they call Intranet 2.0. The idea was that Credit Suisse has many different applications internally and they wanted to put the into one place, so that the customer relationship managers should not log into several applications to serve one client, and also have the personalized views for different type of employees. They used WSRP portlets to integrate the external applications and implemented ~25 portlets for the additional functionality.
To serve the clients they have deployed the portal onto a 16-node-large cluster co-located in 2 data centers. Whatta waste! Banks just don't get it - portal is a wrong way to go! But ok, they have plenty of money for that, so who cares. And architecture compliance is aways so important to such types of companies.
The funniest thing was that the presenter was using a bank's laptop to present the content and it was permanently trying to re-establish the VPN connection :) These bank's security things are just killing me - there should be something better than this.
The next talk was a pretty fair comparison of JSF and Tapestry by Igor Drobiazko. He presented plenty of examples for both, JSF and Tapestry 5, noting the new things in both and stating the pros and cons while explaining why something is done the way it is done. Good presentation especially as I know Igor had his first presentation in front of such a large audience.
One nice example he showed was about reloading the changes by Tapestry on the fly without rebooting or redeploying the entire application, just like JRebel does. Tapestry can to the reloading for almost everything that is included as a source and implemented "the Tapestry way". Unfortunately this mechanism cannot be used as a standalone library for other applications.
if you want to be productive, purchace JRebel or switch to Tapestry
DSL construction with xText was quite interesting, and the slides are already uploaded to Slideshare. xText is used to construct external DSLs as opposed to the approach that Neal Ford presented on the very first day. Previously I was really skeptical about the model-driven approach that xText is promoting, the presentation showed that it is still quite reasonable, especially as xText is heavily relying to ANTLR for grammar construction.
Spring Roo presentation by Eberhard Wolf was a live coding show. Very pleasant! He showed how to get started with Spring Roo, what the tool generates and how it can be altered. Roo (and also many other frameworks) has taken the approach advocated by rails actually - it provides the means for generating the code quickly with assisting the developer while creating the application. The difference is that Spring Roo doesn't enforce any additional runtime dependencies to the resulting application, and also it relies heavily on AspectJ aspects to alter the behavior of Java classes.
The last presentation I attended was about JSF portlet bridge, the brand new standard to integrate JSR168 and JSR286 with JSF1.2. I'm still not convinced that these standards are the right way to go. The portlet/portals approach looks like a very much vendor-driven and doesn't advocate lightweight development model. I know I'm becoming an anti-evangelist of portals but I jsut cannot see any benefit from this technology... unless until someone convinces me that there's no viable alternative.
So now JAZOON 2010 is over. Very good content, well-prepared presenters, lots of networking, very delicious food, awesome location (yes I like Zurich very much). I should have tried to submit a talk to the conference, probably will do that sooner or later.
Thursday, June 3, 2010
JAZOON 2010, Day 2
JAZOON 2010 started with the keynote "Total Cost of Ownership and Return on Investment" by Ken Schwaber, co-developer of the scrum process.

The overview of the keynote speech is available at JAZOON website.
For me the day started with Václav Pech's presentation about concurrency - Unleash Your Processor(s). Tremendous! It was so interesting!
Václav talked about jsr166y, asynchronous background tasks, parallel collections, fork/join strategy, friendly deadlocks and many more. He also mentioned a number of libraries that can help implement actors in Java (Jetlang, for instance). He also explained how do the persistent data structures work and why they are trees in nature. Also, Václav is a big contributor to gpars project for groovy, but he didn't talk about it much as there was a dedicated talk to this topic.
The next presentation I attended was about HTML5 WebSockets, which was also very interesting. I think websockets is the thing we were really missing for many cases and therefor had to build some nasty workarounds to make the things work. Peter Lubbers from Kaazing showed some interesting examples how the new technology compares to Comet, and he also used wireshark to make the evidence. Nice presentation overall.
GPars was next on the list of me. Dierk König from Canoo was giving a talk about parallel programming concepts for the JVM in Groovy. Actually it wasn't a presentation but rather one big demo. Unfortunately, Dierk has to give the demo in groovyconsole as the best IDE in the world crashed (probably because of some 3rd-party plug-in?).
After the references from Václav and Dierk groovy was actually blasted by Nikita Ivanov who was giving a talk cloud computing with Scala and GridGain. I absolutely agree with Nikita about the poor performance of current Groovy, but I'd definitely disagree with the claim that Scala is more concise compared to Groovy. Groovy is extendable the same was as Scala and you can hook into AST of Groovy to alter the syntax if you absolutely need it. Nikita was talking so much and so fast I started to worry about the demo he promised, but he managed to build the example live without any copy-pasteing. Unfortunately there were no time left for more advanced things.
Nikita also introduced Scalar which is an internal DSL for Scala to be used for GridGain. What is nice about it is that with one line of code once could describe the expected behavior of GridGain cluster, instead of writing 10 times more Scala code.
...... to be continued ........

The overview of the keynote speech is available at JAZOON website.
For me the day started with Václav Pech's presentation about concurrency - Unleash Your Processor(s). Tremendous! It was so interesting!
Multithreaded programs today work mostly by accident!
Václav talked about jsr166y, asynchronous background tasks, parallel collections, fork/join strategy, friendly deadlocks and many more. He also mentioned a number of libraries that can help implement actors in Java (Jetlang, for instance). He also explained how do the persistent data structures work and why they are trees in nature. Also, Václav is a big contributor to gpars project for groovy, but he didn't talk about it much as there was a dedicated talk to this topic.
The next presentation I attended was about HTML5 WebSockets, which was also very interesting. I think websockets is the thing we were really missing for many cases and therefor had to build some nasty workarounds to make the things work. Peter Lubbers from Kaazing showed some interesting examples how the new technology compares to Comet, and he also used wireshark to make the evidence. Nice presentation overall.
GPars was next on the list of me. Dierk König from Canoo was giving a talk about parallel programming concepts for the JVM in Groovy. Actually it wasn't a presentation but rather one big demo. Unfortunately, Dierk has to give the demo in groovyconsole as the best IDE in the world crashed (probably because of some 3rd-party plug-in?).
After the references from Václav and Dierk groovy was actually blasted by Nikita Ivanov who was giving a talk cloud computing with Scala and GridGain. I absolutely agree with Nikita about the poor performance of current Groovy, but I'd definitely disagree with the claim that Scala is more concise compared to Groovy. Groovy is extendable the same was as Scala and you can hook into AST of Groovy to alter the syntax if you absolutely need it. Nikita was talking so much and so fast I started to worry about the demo he promised, but he managed to build the example live without any copy-pasteing. Unfortunately there were no time left for more advanced things.
Nikita also introduced Scalar which is an internal DSL for Scala to be used for GridGain. What is nice about it is that with one line of code once could describe the expected behavior of GridGain cluster, instead of writing 10 times more Scala code.
...... to be continued ........
Tuesday, June 1, 2010
JAZOON 2010, Day 1
So here I am at JAZOON2010 conference. The venue is perfect and the content of the conference is quite good to say the least.
The first day has started with a keynote by Danny Cowards, called "Java SE and JavaFX: The Road Ahead". The first question Danny was asked was about the new life in Oracle after Sun's acquisition. I was really disappointed by the politically correct answer...
He also showed an interesting video with James Gosling about the star7 experimental device - this is where Java roots are.
Frankly, I was still so tired because of the flight, so after the 3rd slide I got asleep and I woke up just in time when the talk was finished. Too bad as I suppose that the talk should have been quite interesting, at least the first slides were.
The other talks I have attended were "Pattern Driven Security Design for Web Tier" and "Web Frameworks and how they kill traditional security scanning" (quite a security-oriented day). I wouldn't say that I learned really something new from there, but I definitely have more structured knowledge in my head now, especially what concerns the terminology and pattern names. Also, quite an interesting approach to security scanning was presented, which is advocated by Armorize.
Objects of Value by Kevlin Henney was quite inspiring but too philosophical too me. The only practical value I got from the talk is the 2 books titles:
Problem Frames: Analysing & Structuring Software Development Problems
Pattern-Oriented Software Architecture
The next talk was from Neal Ford about Construction Techniques for Domain Specific Languages. This is a talk that I have seen on various videos, but haven't seen it live yet. Compared to the older versions of the talk, it was almost the same, but just with some improvements - Neal added a couple of slides with referring to some OSS frameworks that do DSL stuff, like easyb. But the general idea is still the same, the examples are the same, and techniques for DSL construction are the same.
The talk about classloaders from Jevgeni Kabanov from ZeroTurnaround was very interesting. Jevgeni presented several examples from the errors that may appear within container, either ClassNotFoundException, NoSuchMethodFoundError or ClassCastException.

The examples started with the very basics and finished with more weird errors which cause memory leaks, especially on application redeployment. Also you may find some interesting articles at ZeroTurnaround's blog about classloaders:
http://www.zeroturnaround.com/blog/reloading-objects-classes-classloaders/
http://www.zeroturnaround.com/blog/rjc201/
http://www.zeroturnaround.com/blog/rjc301/
The closing keynote of the day was by Kelvin Henney - 97 Things Every Programmer Should Know. The problem with that, is that I read the book beforehand :) So I decided to spend some time for networking instead.
Overall:
+ perfect venue
+ very comfortable chairs at the audiences
+ very good organization
+ yummy food
+ good content so far
+ laptop plugs available
- weak wi-fi
- not that many companies are presented this year (compared to 2008), and Google is missing

looking forward for Day 2!
The first day has started with a keynote by Danny Cowards, called "Java SE and JavaFX: The Road Ahead". The first question Danny was asked was about the new life in Oracle after Sun's acquisition. I was really disappointed by the politically correct answer...
He also showed an interesting video with James Gosling about the star7 experimental device - this is where Java roots are.
Frankly, I was still so tired because of the flight, so after the 3rd slide I got asleep and I woke up just in time when the talk was finished. Too bad as I suppose that the talk should have been quite interesting, at least the first slides were.
The other talks I have attended were "Pattern Driven Security Design for Web Tier" and "Web Frameworks and how they kill traditional security scanning" (quite a security-oriented day). I wouldn't say that I learned really something new from there, but I definitely have more structured knowledge in my head now, especially what concerns the terminology and pattern names. Also, quite an interesting approach to security scanning was presented, which is advocated by Armorize.
Objects of Value by Kevlin Henney was quite inspiring but too philosophical too me. The only practical value I got from the talk is the 2 books titles:
Problem Frames: Analysing & Structuring Software Development Problems
Pattern-Oriented Software Architecture
The next talk was from Neal Ford about Construction Techniques for Domain Specific Languages. This is a talk that I have seen on various videos, but haven't seen it live yet. Compared to the older versions of the talk, it was almost the same, but just with some improvements - Neal added a couple of slides with referring to some OSS frameworks that do DSL stuff, like easyb. But the general idea is still the same, the examples are the same, and techniques for DSL construction are the same.
The talk about classloaders from Jevgeni Kabanov from ZeroTurnaround was very interesting. Jevgeni presented several examples from the errors that may appear within container, either ClassNotFoundException, NoSuchMethodFoundError or ClassCastException.

The examples started with the very basics and finished with more weird errors which cause memory leaks, especially on application redeployment. Also you may find some interesting articles at ZeroTurnaround's blog about classloaders:
http://www.zeroturnaround.com/blog/reloading-objects-classes-classloaders/
http://www.zeroturnaround.com/blog/rjc201/
http://www.zeroturnaround.com/blog/rjc301/
The closing keynote of the day was by Kelvin Henney - 97 Things Every Programmer Should Know. The problem with that, is that I read the book beforehand :) So I decided to spend some time for networking instead.
Overall:
+ perfect venue
+ very comfortable chairs at the audiences
+ very good organization
+ yummy food
+ good content so far
+ laptop plugs available
- weak wi-fi
- not that many companies are presented this year (compared to 2008), and Google is missing

looking forward for Day 2!
Thursday, April 22, 2010
Running OpenPortal on Jetty
While running OpenPortal's portlet container on Jetty I've encountered the following error on a portlet deployment attempt:
SEVERE: PSPCD_CSPPD0023
java.lang.IllegalArgumentException: contextHandlerCollection should have been initialized in Jetty config
at com.sun.portal.portletcontainer.admin.deployment.JettyWebAppDeployer.deploy(JettyWebAppDeployer.java:88)
at com.sun.portal.portletcontainer.admin.mbeans.PortletAdmin.deploy(PortletAdmin.java:127)
at com.sun.portal.portletcontainer.driver.admin.PortletAdminDataImpl.deploy(PortletAdminDataImpl.java:78)
at com.sun.portal.portletcontainer.driver.admin.UploadServlet.deployPortlet(UploadServlet.java:149)
at com.sun.portal.portletcontainer.driver.admin.UploadServlet.uploadFile(UploadServlet.java:119)
at com.sun.portal.portletcontainer.driver.admin.UploadServlet.doPost(UploadServlet.java:80)
To fix this, I've added the following lines to my jetty.xml:
SEVERE: PSPCD_CSPPD0023
java.lang.IllegalArgumentException: contextHandlerCollection should have been initialized in Jetty config
at com.sun.portal.portletcontainer.admin.deployment.JettyWebAppDeployer.deploy(JettyWebAppDeployer.java:88)
at com.sun.portal.portletcontainer.admin.mbeans.PortletAdmin.deploy(PortletAdmin.java:127)
at com.sun.portal.portletcontainer.driver.admin.PortletAdminDataImpl.deploy(PortletAdminDataImpl.java:78)
at com.sun.portal.portletcontainer.driver.admin.UploadServlet.deployPortlet(UploadServlet.java:149)
at com.sun.portal.portletcontainer.driver.admin.UploadServlet.uploadFile(UploadServlet.java:119)
at com.sun.portal.portletcontainer.driver.admin.UploadServlet.doPost(UploadServlet.java:80)
To fix this, I've added the following lines to my jetty.xml:
<Call
class="com.sun.portal.portletcontainer.admin.deployment.JettyWebAppDeployer"
name="setHandlerCollection">
<!-- assuming that Handlers are configured by default -->
<Arg><Ref id="Handlers"/></Arg>
</Call>
Friday, April 16, 2010
RailsConf 2010, June 7-10 @ Baltimore, Maryland
RailsConf 2010 is coming! The registration is opened. Damn I have no budget yet to participate. The videos from the previous years are superb and I'm very sure the quality will not degrade if you take a look who the presenters are.
uCertify promotional codes
I have done reviews for uCertify PrepKits previously:
1) uCertify's PrepKit for SCJP6.0
2) uCertify's PrepKit for SCBCD5.0
Now, uCertify is giving out 20% discount on all its PrepKits. Use promotional code SPRING during the checkout to avail this offer. This offer is valid until 20 April, 2010 and it will work on all uCertify PrepKits. Full details of the sale can be found here.
Overall, it is a good investment if you're preparing for a professional certification. Good luck!
1) uCertify's PrepKit for SCJP6.0
2) uCertify's PrepKit for SCBCD5.0
Now, uCertify is giving out 20% discount on all its PrepKits. Use promotional code SPRING during the checkout to avail this offer. This offer is valid until 20 April, 2010 and it will work on all uCertify PrepKits. Full details of the sale can be found here.
Overall, it is a good investment if you're preparing for a professional certification. Good luck!
Subscribe to:
Posts (Atom)















