Archive
Jfokus 2013: Java8 and functional programming
In februari this year I attended Jfokus 2013. In a earlier post I talked about responsive web design which catched my intrest during Jfokus. In this post I will talk about another subject that catched my intrest, java8 and functional programming.
Read more…
OpenEJB
An open source, embedded, lightweight, easy to configure EJB Container and EJB Server. Using OpenEJB turned out to be the salvation when developing EJB applications. Even if your requirement is not to start with the test first approach you still need to run your EJB class and can’t wait until to deploy. And deployment is not so fast as well unless you use special tools like JRebel or so on. You can find more information on web about OpenEJB and if there is something better than that. But when you have decided to use OpenEJB then you could face some problems which I took few hours for me to fix. Anyway let’s slide through the problems. Read more…
Vaadin Framework
is a Java web application framework. It is designed for creating rich and interactive applications that run in the browser, without any plugins. No HTML, XML or JavaScript necessary just like GWT. GWT applications run in the browser, while Vaadin applications run on the server using GWT as a “rendering engine” on the browser side, so you can combine Vaadin and GWT. Read more…
Some hibernate characteristics
Hibernate is a mature ORM tool for Java environments and is Free under LGPL. Hibernate lets you map your Java classes to database tables, and also provides data query and retrieval facilities. This article will focus on data query and retrieval facilities. I will not go into detail about how a query might be built and instead focus on some other things that a developer should have in mind.
The term session is a central part of the framework. The sessions lifecycle can span several database transactions and is the place where you create, read, update, delete instances of your mapped entity classes. Instances of your java classes can exist in three different states. Transient: An instance is transient when it at no point in time has been persisted with the session e.g when a new instance is made in your application. Persitent: An instance is persistent when it is associated with a session. Detached: The instance has previously been persisted but is currently not associated with a session.
Hibernate and JPA guidelines [part 3]
This is the last post of three with Hibernate/JPA guidelines. This post consists more of some tips and trix rather then general guidelines. As I wrote in previous posts each topic is divided into three parts; problem, suggestion and value. All topics evolves from a identified problem and then makes a suggestion for dealing with the problem and a value for what benefits you get from using the suggestion.
Hibernate and JPA guidelines [part 2]
This is the second post with Hibernate/JPA guidelines. As I wrote in the previous post each topic is divided into three parts; problem, suggestion and value. All topics evolves from a identified problem and then makes a suggestion for dealing with the problem and a value for what benefits you get from using the suggestion.
Read more…
Hibernate and JPA guidelines [part 1]
I recently had a cooperation with some colleagues from the Oracle team, putting together a document with some guidelines and tips for working with Hibernate/JPA and Oracle from a performance point of view. I decided to take some of these general guidelines and tips for Hibernate/JPA to do a three part serie with blogposts here on our blog. Each topic is divided into three parts; problem, suggestion and value. Each topic evolves from a identified problem and then makes a suggestion for dealing with the problem and a value for what benefits you get from using the suggestion. Anyone working with Hibernate or JPA should take some of these guidelines and tips under consideration. They are not just for improving performance. Some are more general best practices to ensure quality, easier coding and performance.
RPC/Encoded webservice
When you need to consume a webservice and that service is using a deprecated rpc/encoded binding style, then you are faced with a problem that there is no real good solution to. In short, the problem is that all the JAX-WS implementations from a couple of years back have ommitted their support for this configuration. “The WS-I Basic Profile limits binding styles to either Document/literal or RPC/literal, and JAX-WS was designed to honor this limitation” I can think of a couple of options to work around this problem. Read more…
Representing a service both as RESTful and SOAP based using Apache CXF
Apache CXF is an open-source Web Services framework supporting both JAX-WS and JAX-RS. This means that we could create a service and offer it both as RESTful Web Service and traditional SOAP based Web Service. With CXF when you get the WSDL file (we will see how) or WADL (REST equivalent of WSDL) you can pass the link to the ones who are to write a client application and they can use it to configure the plugin and the required code is generated. With Maven things become even simpler. Read more…
TestNG(Next Generation) a unit testing framework
There might be other unit testing frameworks available which maybe better than TestNG but for me coming from a JUnit test framework background it was easy to adapt to TestNG (which has got inspiration from JUnit and NUnit). The requirement I had was to have a test framework where it was:
- Easy to pass data as parameters to the test from a resource file Read more…