Hibernate Many-to-Many Mapping (JPA)

A few months ago, I wrote an article how to map the one-to-one bi-directional relations between two entities and now is the time for a simple example how to map many-to-many relation. You can find what Many-to-Many relation means in Wikipedia, and the following article only shows how it looks like in Db and how it can be mapped in Hibernate. Ready? Read the rest of this entry »

Java Generics and Collections. Safe conversion

Are you working with Java? Have you ever seen the following warning message:

Type safety: The expression of type List needs unchecked conversion to conform to List<SomeClass>

I’ve seen it a lot. Technically, there is nothing wrong with this warning in most cases. The warning is related to API that either was built to support Java versions less than 1.5 or is a bit clumsy. Anyway, I do not really like any warnings in my code so I can’t ignore it. How to remove this warning? Read the rest of this entry »

FMS and Ghost Connections

In the following article I would like to talk about ghost connections on the FMS server. First of all, what does the term “ghost connection” mean? It is a registered and alive connection on the server without the real client. How could it happen? There are a few scenarios. Read the rest of this entry »

How to Test JSR 303 Bean Validators

If you ever see how the JSR 303 validation works, you probably know how awesome this way is. I like it because it makes the code more readable, easy to maintain and to add new features. Additional information about the approach is available here, and in this article, I am going to show how to test JSR 303. Read the rest of this entry »

Amazon Load Balancer and DynDNS

Yesterday I observed an interesting situation. Let’s take a look at the following use-case:

Let’s assume we have a web project hosted in Amazon Cloud. In Amazon, we do have a simple cluster with 2 nodes and the load balancer at the front. Next, we have a domain and we are using dyndns to manage dns records for our domain. Our goal is to point our domain to the load balancer. Read the rest of this entry »

Hibernate One-to-One Bi-Directional Mapping

In the following article, I would like to show an approach how to map one-to-one bi-directionall two entities in Hibernate.
First of all, let’s take a look at the relation between two tables in a database:


As you can see, there is the one-to-one relation between user and user_profile tables and the user_profile table has a primary key that in fact, it is a foreign key to the id property of the user table. In other words, there is a simple use-case: one user record can have only one related user_profile record.

What the mapping looks like?

There are two classes. Read the rest of this entry »

.NET to JavaScript Data Push using WebSockets

With the latest WebORB release (.NET as well as JAVA), Midnight Coders announced the full support of the WebSockets technology. Briefly speaking, WebSockets allow bi-directional communication between server and client sides through TCP sockets. Specifically, your JavaScript client can exchange data with the server-side in the real-time! A web page can use JavaScript to establish a connection with the server and bi-directionally send data to and receive data from it without any page refreshes. It sounds awesome, doesn’t it? Read the rest of this entry »

Issue in serialization of subclasses of any IExternalizable implementation

Let’s consider the following use-case.

There is a client – server basic application. The client uses a simple remoting to communicate with the server side. The server side could be powered on WebORB, BlazeDS or any other solution. The client side is using the FLEX framework. That is it about the technology stack. Now, let’s forget about the server side and just have a look at the following client code Read the rest of this entry »

.NET to Flex Data Push using Messaging Destinations

Few days ago I received a question about how to push data from the server code (C#) to the client side (ActionScript) though a messaging (publish/subscribe) destination. The server side is powered by WebORB for .NET and the client side is a Flex (or AIR) client. Read the rest of this entry »

How To Secure Your Application (Flex + Remoting/RPC)

In the following article I would like to show how to secure a Flex application which uses RPC (remote procedure calls) to communicate with the server-side. The article consists of three parts:

  1. A simple use-case and the problem description
  2. How to hack a Flex application
  3. How to secure it

The problem is not related to a particular product. However, the solution provided above is oriented only for WebORB for .NET.¬†Well, let’s move forward to the step #1? Read the rest of this entry »