Jboss / Wildfly maven plugin to deploy on localhost/remote server

This is a very simple solution, that unfortunately took me a couple of hours because I couldn´t find it anywhere… Place your server properties in the maven settings.xml file (found in the .m2 folder) like this: In the pom.xml file place the plugins under build>plugins> and set the server configuration parameters as maven properties (without […]

Arquillian testing with Maven in Eclipse: Deployment scenario issue (Glassfish embedded example)

To run a test with Arquillian using Maven you might consider embedded, local or remote containers. You can set them all in your pom.xml file and specify deployment profiles like the following: The container must be configured in the arquillian.xml file. A simple one might look like this: Setting the container in the pom.xml and […]

Glassfish 4.0 : “Hello world” application with Maven 3

The following steps will allow you to develop and deploy a first demo web-app with Glassfish Server 4. 1) To install Glassfish 4.0 follow the steps at http://glassfish.java.net/download.html For example, you can get the zip version and extract into: C:\glassfish4. 2) If you´re working on a Windows Desktop Rename glassfish4/glassfish/bin asadmin to *.s to prevent […]

JAXB part 7: increase performance with singleton JaxbContext instance

Currently I am developing an application to rename some jboss configuration content. Using JAXB, I had made marshalling and unmarshalling methods, creating a new JAXBcontext instance each time the single methods were invoked (for each xml file!). The application was incredibly slow. Taking up to 45 minutes to complete the tasks. Then I have discovered […]

JAXB part 4: handling CDATA elements

If you want to specify that element values are CDATA, you can create an adapter class like this: import javax.xml.bind.annotation.adapters.XmlAdapter; In the bean class, generated by JAXB add the following annotation. In this way any occurrence of the elements with the annotation above will be automatically parsed as CDATA.