eskatos's thoughts

Posts Tagged ‘java

How is exception handling implemented in JVMs ?

without comments

Seeking for a good “error handling in java” habit I found interesting readings. I already downloaded and read many bytes of text about checked/unchecked exceptions and fault barriers. But I wanted to know how is exception handling implemented in JVMs, time to go back to basics :) Read the rest of this entry »

Written by eskatos

September 30, 2009 at 9:09 pm

Posted in Code

Tagged with ,

jaroverlay-maven-plugin is dead, long live truezip-maven-plugin

without comments

MavenI think I was the only humain being using my jaroverlay-maven-plugin.

Now that truezip-maven-plugin has been published I refactored my builds to use it. It is not only working but it’s both quicker and cleaner with this plugin.

As a consequence I discontinue jaroverlay-maven-plugin development.

Written by eskatos

April 23, 2009 at 9:07 am

Posted in Projects, Tools

Tagged with , ,

asadmin-maven-plugin-0.2 released

with 3 comments

GlassfishI released the second version of asadmin-maven-plugin today.

It added the following features :

  • Issue#1: support for maven projects with “ejb” packaging
  • support for (un)deploying to remote glassfish instance (thanks to Larry Sanderson that provided the patch)

The following issues were fixed :

  • Issue#2: asadmin is not found when only glassfishHome is specified and glassfishHome/bin not in PATH (thanks to streifi that provided a patch)
  • Issue#3: asadmin:start-domain hangs on windows (thanks again to streifi)

Go to the project’s page for more information.

Written by eskatos

July 20, 2008 at 5:45 pm

Posted in Projects

Tagged with , ,

Maven plugins for Glassfish ecosystem

with 7 comments

GlassfishThis post is only a snapshot of what is available at the time of writing to use Glassfish from maven., seen from the perspective of a simple maven plugin developer (simple plugin or simple developer ?).

Before beginning asadmin-maven-plugin, I searched and tried several ways to use Glassfish from maven. Main use case is simply deployment and undeployment of applications.

There are two ways to do this “programmatically” :

  • using the asadmin command, Glassfish specific,
  • and using the JSR-88 api, app-server agnostic

Read the rest of this entry »

Written by eskatos

March 28, 2008 at 12:31 am

Posted in Projects

Tagged with , , ,

A repository for asadmin-maven-plugin

without comments

GlassfishTo ease the use of asadmin-maven-plugin I have set up a public repository that you can add to your maven settings / poms / proxies for maven to be able to download the plugin automagically.

The repositories are :

Here is the xml snippet you could add to your pom.xml file :

    <pluginRepositories>
        <pluginRepository>
            <id>asadmin-maven-plugin-releases-repository</id>
            <name>asadmin-maven-plugin-releases-repository</name>
            <url>http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/releases</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>asadmin-maven-plugin-snapshots-repository</id>
            <name>asadmin-maven-plugin-snapshots-repository</name>
            <url>http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/snapshots</url>
            <releases><enabled>false</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
    </pluginRepositories>

Plus, if you browse the source tree you’ll find two exemple projects, a WAR and an EAR, that use this plugin.

Written by eskatos

March 26, 2008 at 12:30 am

Posted in Projects

Tagged with , , ,

A simple maven plugin for Glassfish: asadmin-maven-plugin

with 2 comments

GlassfishTo seamlessly use Glassfish from maven projects, JSR-88 seems to be answer. The cargo maven plugin has JSR-88 support planned but this will take time.

I published some days ago a maven plugin that simply wraps the asadmin command and aims to provide maven integration for starting, stopping glassfish and deploying and undeploying applications and modules.

Go to the Google Code page of asadmin-maven-plugin to download a preview version named asadmin-maven-plugin-0.1-SNAPSHOT : http://code.google.com/p/asadmin-maven-plugin/

The api is designed for easy extensibility so feel free to submit contributions !
Read the rest of this entry »

Written by eskatos

March 24, 2008 at 4:30 pm

Posted in Projects

Tagged with , ,

A simple^W dumb Map wrapper to use with JAXB

with 5 comments

Java XML

I sometimes need to use java.util.Map objects in WebServices. As I’m building all my WebServices with the JAX-WS RI (using the Metro bundle). The block responsible for XML (un)marshalling of POJO, named JAXB, does not allows to directly use Maps as a soap operation parameter. For this purpose I’ve written the following simple class that allows me to wrap Maps in a POJO that JAXB is able to (un)marshall :

public class JAXBMapWrapper<KT, VT> {

    private Map<KT, VT> wrappedMap;

    public JAXBMapWrapper() {
        wrappedMap = new HashMap<KT, VT>();
    }

    public Map<KT, VT> getWrappedMap() {
        return wrappedMap;
    }

    public void setWrappedMap(final Map<KT, VT> givenMap) {
        wrappedMap = givenMap;
    }

}

ATTENTION: I posted this some days ago and removed the post after understanding that this is simpler on the service side but that the client side gets cumbersome generated classes.. but google cache indexed the post in less than half a day.

Just don’t use this ! :) If you need to transmit Maps over JAX-WS webservices, do it the XmlAdapter way as advertised in the official Unofficial JAXB Guide instead.

Written by eskatos

March 14, 2008 at 10:50 pm

Posted in Code, HOWTOs

Tagged with , ,

Could it be dared to say that java is overdesigned ?

without comments

JavaJava 7 is coming. And it’s an awesome project ! Now that java is distributed under the GPL, developers can believe that the JSR way of doing things will be more and more pragmatic.

The title of this post is a little bit coarse but this is the feeling java gives to developpers who “learn and use java to create and run programs that make devices and internet useful for people“.

I just read some articles about jdk7 changes that I want to share :

About the new framework for fork-join style parallel decomposition and the ParallelArray class in java.util.concurrent :

About the first attempt to give packages and visibility modifiers a lift :

The first ones are really exciting ! The one about the superpackages scares me a little. I know it’s the first “public” communication about it but I sincerely hope that the final solution will be presented with successfull examples of complex implementations, ie. will be pragmatic.

Written by eskatos

March 8, 2008 at 2:46 am

Posted in Code

Tagged with