Home » JVM Languages » Groovy » Page 13

Groovy

How to keep session in HttpBuilder with cookies

In my real-world scenario I have a REST service for AJAX purposes. It renders data series for graphs. I want to test it with groovy’s excellent HttpBuilder. There is a problem though – these requests are only available for already logged in users. In this post I present a complete solution to maintain a session state between HttpBuilder‘s requests. Session ...

Read More »

Groovy Java companion – introduction

Some of us come to Java from scripting languages like Python, Ruby or Perl. Almost everything in Java is fascinating but small things make us irritated. Java is a verbose programming language and writing programs similar in functionality to scripts is cumbersome. Dealing with stuff like XML, json, even Strings is not so handy. Things which should be straightforward are ...

Read More »

Maven: Start an external process without blocking your build

Let’s assume that we have to execute a bunch of acceptance tests with a BDD framework like Cucumber as part of a Maven build. Using Maven Failsafe Plugin is not complex. But it has an implicit requirement: The container that hosts the implementation we are about to test needs to be already running. Many containers like Jetty or JBoss provide ...

Read More »

Grails AJAX Examples

Early on, newcomers to Grails encounter a lack of working samples accompanying the framework.  Good places for examples and documentation include the Grails documentation and bloggers. Ajax is one of the features with built-in support by Grails.   Once people get their “head around” the Grails basics, they generally want to move onto more interesting features like Ajax.  This usually ...

Read More »

Groovy & Grails Understanding – Part2

Grails Grails is a web framework based on Groovy and Java which can be deployed into existing Java web servers, e.g. Tomcat or Jetty. Its scaffolding capabilities let you create a new project within a few minutes. Grails is based on the “convention over configuration” idea which allows the application to auto-wires itself based on naming schemes (instead of using ...

Read More »

Groovy & Grails Understanding – Part 1

Introduction Enterprises today require agile platform for rapid development of applications with ready assurance to quality of services, compliance to architecture and design standards. Two key things influence our ability to be agile. First, it’s the attitude of everyone involved. Second it’s the languages, framework, and tools we use to get our work done. There are languages and frameworks such ...

Read More »

Grails Design Best Practices

Grails is designed to be an interactive agile based rapid development framework which advocates convention not configuration. This article explained the usage and best practices around the Grails.                 Domain-driven design Always use domain-driven design: First create your basic domain model classes, and then use scaffolding to get them online. This will help ...

Read More »

Detecting Java Threads in Deadlock with Groovy and JMX

Unfortunately, Java applications taking advantage of multiple threads can at times run into the dreaded deadlock condition. Fortunately, the Java Platform makes deadlock detection relatively easy. In fact, the built-in (since J2SE 5) ThreadMXBean (a PlatformManagedObject exposed via JMX) makes this information available to any client that ‘speaks JMX‘ via the findDeadlockedThreads() and findMonitorDeadlockThreads() methods. General ‘JMX clients’ such as ...

Read More »

“Booting AMX” in GlassFish 3 with Groovy

In my previous blog post, I looked at using JMX as one of multiple methods supported by GlassFish 3 for its administration, monitoring, and management. In this blog post, I look in more detail at monitoring and managing GlassFish 3 via JMX and Groovy. I focus on local connection to GlassFish using the Attach API in this post, but I ...

Read More »