Java

How to build a jmeter plugin utilising groovy

This is just a very short and simple example of how to build a jmeter plugin. Jmeter is awesome and allows you to extend it by adding all sorts of components. What i wanted to do was to have separate test plans and reuse the configuration variable sets. My use case is that i want to have set of global settings with ability to override some of them with additional config files.

How to build jmeter from sources in eclipse

Jakarta jmeter is an awesome tool. I deeply encourage to experiment with it. If you want to see more details on how it is implemented or write your extension it may be worth compiling it from sources on your machine.

Here is a quick guide how to setup a eclipse project and what to do to build jmeter from sources and run it locally.

An easier way to setup terracotta session replication in tomcat 6

The post i wrote some time ago about configuration of session replication in tomcat can be done in a much easier way now. Instead of setting up clustering of session objects via bootjars and heavy voodoo all we have to do now is configure a session replicating valve in your tomcat using application scoped meta-inf/context file!

Setting up latest ehcache and terracotta in your grails application

EhCache is an API for caching in Java and its also integrated into grails by default. The only thing is that its not the latest version so if you want to use the latest terracotta and latest ehcache you will have to integrate it and set it up yourself. Its not really a big deal but i post this tutorial just hoping that it could help someone.

Java compilation hanging forever on javac using macosx

This is a funny problem that took forever to figure out! unreal!

Friend committed new component into the revision control system i checked it out and my maven builds would get stuck on compilation. It would take like 20 minutes to run the compilation!

Compilation with javac would take forever no matter if there was error or not. Importing any net.xxxx package would make builds stall forever.

How to generate self signed SSL certificate for Glassfish v3 and import it into Java keyring

Java applications that use ssl to consume web services via jax-ws or use HTTP clients may check the SSL certificate of the server in runtime. In case if your certificate is self signed or Common Name of the certificate does not match the domain name you will get connection errors.

To be able to develop applications you may need to run them on dev/qa servers and then allow your Java application consume these services. To do it you will need to import their SSL certificates into your local Java keyring (the same way you add exception rules into your browser).

How to setup terracotta session clustering and replication for apache tomcat 6

Terracotta is an amazing piece of software and it comes with some really cool tools and features. To enable Tomcat 6 session replication via terracotta you need to do a few things but its relatively simple lets do it.

How to import self signed SSL certificate to Java keystore (adding https certificate)

If you are writing a Java or grails application and want to consume https web service or download something over SSL you may need to add the certificate manually to the keystore.

If your web service does not have properly signed certificate (like self signed ones) then you have no choice. Libraries may throw exception and you wont be able to access the resources. But no fear there is an easy way to fix it and add any SSL certificate to local keystore.

Fixing java.lang.OutOfMemoryError: PermGen Out of Memory in grails STS and tomcat

Grails, Tomac and Glassfish keep on crashing during deployment or reloading of your web application with out of memory permgen space errors? Seems like you are one of the millions other developers that have this problem : -)

Its all about loading too many classes. In Java classes are loaded in special memory area which can not grow above the max perm gen setting.

It may be frustrating especially if you are at the beginning of your journey with grails. Grails spring, hibernate and all the plugins depend on so many jars and classes that default memory settings are often not enough.

Overriding plugin templates in Grails application

Grails plugins are handy but there is one feature i did not expect. When you create a plugin you can add taglibs there. Then in a tag you call render and provide plugin attribute so that render would know to search for the template in the plugin context. It looks very similarly for views in controllers. The difference is that if you place view file in the application it will override the view file of the plugin but if you place template file it will not override the plugin template.

Review - Java Web Services

Seems like i am out of luck lately when it comes to books. I must say this book was not really my type. Sometimes it is not easy so describe why, but book is just tough to read.

The thing i did not like about the book was that examples drag for entire pages. I know its difficult to show some things in concise way but i think this book had the longest code examples i have ever seen : -)

Review - Grails in action

Grails in action

Grails in action is an excellent book for all grails and groovy developers. It covers all main aspects of grails development and even more. In the same time it does all that within 450 pages. I liked reading the book as its written in a nice and easy English, good style and clear explanations. As other 'in action' books it does set high standard of both language and the content.

Grails clean build deletes target/classes folder

For some reason my Spring Tool Suite has a problem with grails clean target. Most of the time running clean script removes 'target/classes' folder after which i am getting errors like:

Error automatically restarting container: 
destination directory "/workspace/target/classes" 
does not exist or is not a directory

To get rid of the issue edit the file:

/grails-1.2.1/scripts/_GrailsClean.groovy

and add mkdir command at the end of cleanCompiledSources target

Groovy on Grails might be actually the technology we were looking for!

I have worked with Grails lately and i have to say it seems like it may be the technology i was looking for! I am a skeptic by nature but I am getting more and more excited about Grails. It is really a cool and deeply thought out framework for all web development needs.

Why is Grails better than Rails?

Some might say that jruby will let you do the same thing and keep it old school (ruby not groovy). To be honest, i don't like Ruby as a language that much. I have read some articles/books (just a few) and i have read some code as well. I must say it seems to me more like perl than Java. Maybe its just matter of personal taste but ruby seems little bit messy to me.

Review - Groovy and Grails Recipes

I have to admit that i did not really want to get into another language this year. Its so much effort and usually so little gain of it. But what can you do sometimes you have to ;-).

While evaluating web platform alternatives we began with JSF2/JSTL/JSP/Struts. None of them seemed suitable for our needs. None of them seemed usable either. We began to look around for much more lightweight frameworks and thats when we started looking at Grails and Spring MVC.

Syndicate content