Showing results for Java (tag)

Put JAX-RS to work with Adobe Flex

1 Comment » January 13th, 2010 by Henri Bezemer

In my previous post I’ve shown how to build a simple set of RESTful services with JAX-RS, and how to access those services from a XForms client. That example also showed the RESTful principle of HATEOAS. In this post I’ll show how to build a Adobe Flex 3 client to those services. Read more…

HATEOAS by Example

3 Comments » January 7th, 2010 by Henri Bezemer

Hypermedia as the Engine of Application State (HATEOAS) is a very useful concept in the RESTful architectural style. The best way to show the benefits of HATEOAS is by giving an example. In this post I’ll be using the Jersey JAX-RS framework to build three RESTFul services. By mixing XForms into the equation, these services form a complete (yet tiny) web application. The example can be deployed on GlassFish. Read more…

JAX-RS: At ease with REST

Comments Off December 29th, 2009 by Henri Bezemer

In this post I will create a RESTful service using the JSR 311 JAX-RS implementation called Jersey on the GlassFish application server. This service will closely match the capabilities of the typical hello world demo. The focus of this post is to show how to develop a RESTful service with JAX-RS and Maven and how to deploy it on a J2EE application server like GlassFish. Read more…

Dynamic navigation with XForms

2 Comments » December 29th, 2009 by Henri Bezemer

XForms are a great way for a Java web developer to avoid the use of the JSF framework. Instead of authoring world-wide open standard (X)HTML pages, JSF lets you code JSP pages with JSF tags. JSF forces you from a truly open standard into a less open Java only standard. This alone makes me want to avoid JSF.

XForms is a programming language independent W3C open standard. In this post I will not try to show all the benefits of using XForms. I’ll assume that you’ve already decided that you want to use XForms with Java. XForms is powerful enough to provide most if not all of the presentation logic that your web site requires. In this post I will explain how dynamic navigation can be achieved fully in XForms, thereby stripping the server side Java code of all presentation logic. Dynamic navigation is a mechanism found in the JSF framework. Put very simply, an agent (browser) posts data collected on a page to a server and the outcome of processing this data determines the next page. Read more…

Consuming Web Services from EJB 3 using JAX-WS

1 Comment » November 30th, 2009 by Henri Bezemer

In this post I will show how to consume a Web Service from an EJB 3 stateless session bean, with very little coding involved by leveraging the JAX-WS specification and tooling. I will add this ability to the CRM EJB that I presented in an earlier post: http://www.zienit.nl/blog/2009/11/enterprise-java/web-services-made-easy-with-ejb-jpa-and-jax-ws. I will also explain how to bundle WSDL and XML Schema files with an EAR deployment file using a catalog, how to customize the JAX-WS generated code and how to design a single Maven build process for deployment to multiple environments (development, staging and production). Read more…

Web services made easy with EJB, JPA and JAX-WS

Comments Off November 4th, 2009 by Henri Bezemer

In this post I will share some code and findings that came out of an experiment with EJB 3.0, JPA (included in EJB 3.0) and JAX-WS (Java API for XML-Based Web Services) 2.0. My goal was to create a useful layer of web services on top of a database with as little Java code as possible. I wasn’t sure if the three technologies could be mixed together in a thin layer without running into serious trouble, so I decided to create an example application and test it on three popular open source Java Application Servers: Geronimo (2.1.4), Sun GlassFish Enterprise Server (2.1) and JBoss (5.1.0 GA). I’m running these Application Servers on Sun JDK 6. Read more…

Upload a Java WebApp to Google App Engine

Comments Off October 9th, 2009 by Henri Bezemer

The Google App Engine supports the Sun Java Servlet Specification, together with a bunch of other standard and Google specific Java API’s (not including EJB). Google lets you run your Java webapp for free but with limited CPU time, bandwidth and number of requests per day. If one of these resources has been consumed your app will lock up for the rest of the day and respond only with HTTP code 403 ‘Forbidden’. If you need more you can pay for additional resources. The resource quota for a free account are more than adequate for a proof of concept. Read more…