Posts Tagged ‘ spring

who needs implementations?

At least for some common patterns like DAOs.

As a popular manner, most of the java applications have at least three layers like UI, Service and DAO. For each layer you probably have interface and a single or more implementation classes.  And while UI layer has some really complex businesses for effective UI experience, DAO layer is only related with CRUD operations for a single or a group of beans.

Here is the routine that you can get rid of

Read more

Java7 Wish: Object/Bean Factory

One of the most critic point for java


return Class.forName(className).newInstance();

Upon since it seems this method bring the ultimate extensibility power to java.

But Now server & client applications became more and more complicated this feature became insufficient.

Read more

JGroups-Spring In Action

If your are new with jgroups ,take a look JGroups Basic and other jGroups posts
Some Sample Code you may use for adding networking utilities to your Application

Two FactoryBeans for JGroups

  1. ChannelBeanFactory for creating JChannel Instances
  2. ReplicatedHashMapFactory for ReplicatedHashMapFactory Instances

Read more

hibernate cache injection: missing…

currently hibernate version is 3.2.5 and there is still something basic missing: cache injection.

Read more

Clustering Acegi via JGroups (DistributedHashtable)

in my previous blog I suggest to use jms or caching for a distributable SessionRegistry
but I found a more simple solution JGroups -

DistributedHashtable :JGroups gives us such a perfect simple class to distributed maps.

  • All read-only operations runs on local copies
  • perfect merge strategies.
  • easy implementation and configuration
  • vs..

Read more

DistributableEventPublisher for Spring via JGroups

drawing6.pngMessaging is really easy through a single JVM. For a distributed environments JMS is strongly recommended. but for smaller and simple projects here is and example implementation via JGroups.
Usage

DistributableEventPublisher distributableEventPublisher=….
distributableEventPublisher.castEvent(TEXT_MESSAGE/XML/Serializable);

requirements:

  • springframework 2+
  • JGroups 2.6.1
  • JUnit (for test)

The PartyCasino (http://www.partycasino.com/ ) Anywhere java applet probably uses JMS too.
Read more

light-weight distributed messaging via JGroups

JGroups is a framework that provide seamless networking utilities for java/j2ee applications. As a light-weight alternative to JMS here is an example.

Read more