• Home
  • RSS Feed
  • Log in

Archive for April, 2009


Inter Portlet Coordination with JSR 286
Posted by Vikas Gupta mid-afternoon: April 19th, 2009

Coordination between portlets is a very common requirement. An example of information sharing between portlets can be a weather portlet displaying the weather information of a city and a map portlet displaying the location of the city. Since, both the portlets would be using the same zip code for a user, there should be mechanism provided by the portlal containers to allow portlets to share the zip code.

Prior to JSR 286, the support for inter portlet communication was rather minimal and information sharing between different portlets was accompalished primarily using application scoped session objects or vendor specific APIs. Both of above methods were rather problematic as in the former maintaining the uniqueness of the session attribute over a complex aaplication was a concern and in the later portability of the portlet was hampered. In order to provide coordination between portlets the Java Portlet Specification v2.0 (JSR 286) introduces the following mechanisms:

  1. public render parameters in order to share render state between portlets.
  2. portlet events that a portlet can receive and send. 

Let’s have a look how to use the above features.
(more…)

Share

Tags: JSR 286, portlets, websphere, websphere portal
Filed under General | 44 Comments »


Setting session bean property in SeamTest
Posted by Sunil Prakash Inteti in the early afternoon: April 17th, 2009

SeamTest is a class we extend for the tests we write in our Seam application. It provides the seam environment in tests something analogous to WicketTester in Wicket Application.
I want to share some information on setting the property of Session bean, i came to know while using the SeamTest.
(more…)

Share

Tags: Seam
Filed under Java, Testing | No Comments »

Sander Hautvast

Logging in Websphere Application Server using Apache commons-logging and Log4j
Posted by Sander Hautvast in the early evening: April 10th, 2009

Logging should be simple and straightforward. It is an essential part of everyday administrative operations and it provides vital information for debugging production incidents. Adequate logging saves time and money.  When hosting a number of applications, say 10+, you will want to separate application logs from each other  and from platform logs and traces. Logging frameworks like the jdk logger and log4j, cooperating with the j2ee container provide the means to do this, using configuration files. So far, so good.
(more…)

Share

Tags: websphere
Filed under Java, Middleware | 5 Comments »


JPA implementation patterns: Removing entities
Posted by Vincent Partington in the early morning: April 9th, 2009

For the last few weeks I have been covering the implementation patterns I discovered while writing JPA applications. The last two blogs covered saving entities and retrieving entities. But when you’re really through with your entities, I guess you’d want to remove them too. ;-) So that is the subject of this blog.

Just like retrieving an entity, removing an entity is pretty simple. In fact it’s all you need to do is pass the entity to the EntityManager.remove method to remove the entity from the database when the transaction is committed (Of course you’d actually invoke a remove method on your DAO which in turn invokes EntityManager.remote). That’s all there is to it. Usually. Because when you’re using associations (be they bidirectional or not) things get more interesting.
(more…)

Share

Tags: Hibernate, JPA, JPA implementation patterns
Filed under Java, JPA, JPA Implementation Patterns | 21 Comments »


Web 2.0 Expo 2009 San Francisco
Posted by Anurag Shrivastava terribly early in the morning: April 7th, 2009

San Francisco 31 March – 3 April: Web 2.0 Expo brought together people with diverse professional backgrounds, having interest in Web 2.0, at Mascone Centre in San Francisco. San Francisco Bay Area, also known as Silicon Valley boasts of high concentration of information technology companies of all sizes ranging from biggies like Intel Corporation to numerous start ups trying to make it big.
(more…)

Share

Tags: Hibernate, JavaOne
Filed under Agile, Scrum, Web 2.0 | 2 Comments »

Maarten Winkels

Why did Hibernate update my database?
Posted by Maarten Winkels in the early afternoon: April 6th, 2009

Hibernate is a sophisticated ORM framework, that will manage the state of your persistent data for you. Handing over the important but difficult task of managing persistent state of your application to a framework has numerous advantages, but one of the disadvantages is that you sort of lose control over what happens where and when. One example of this is the dirty checking feature that Hibernate provides. By doing dirty checking, Hibernate determines what data needs to be updated in your database. In many cases, this feature is quite useful and will work without any issues, but sometimes you might find that Hibernate decides to update something that you did not expect. Finding out why his happened can be a rather difficult task.
(more…)

Share

Tags: dirty checking, Hibernate, StaleObjectStateException, versioning
Filed under General | 9 Comments »


JPA implementation patterns: Retrieving entities
Posted by Vincent Partington around lunchtime: April 3rd, 2009

Last week I talked about how to save an entity. And once we’ve saved an entity we’d also like to retrieve it. Compared to managing bidirectional associations or saving entities, retrieving entities is actually rather simple. So simple I doubted whether there would be much point in writing this blog ;-) . However we did use a few nice patterns when writing code for this. And I’m interested to hear what patterns you use to retrieve entities. So here is the next instalment in the series on JPA implementation patterns.

Basically, there are two ways to retrieve an entity with JPA:

  • EntityManager.find will find an entity by its id or return null when that entity does not exists.
  • If you pass a query string specified in Java Persistence Query Language to EntityManager.createQuery it will return a Query object that can then be executed to return a list of entities or a single entity.

(more…)

Share

Tags: JPA, JPA implementation patterns
Filed under Java, JPA, JPA Implementation Patterns | 16 Comments »

Robert van Loghem

Java Persistence API – Podcast – JSpring ’09 Preview
Posted by Robert van Loghem mid-morning: April 3rd, 2009

On the 15th of April the NLJUG (Dutch Java User group) will be holding their J-Spring conference. Four Xebians will be presenting. Every week we’ll be providing a sneak preview on the podcast of one of those presentations.

The second sneak peek is about The Java Persistence API – How do i build a real application by Vincent Partington.

The preview is in Dutch, a full interview in english will be coming in about 4 weeks.

You can find more information here or read Vincent’s JPA blog series.

Vincent’s presentation is from 14.25 to 15.15

So head on over to the show page or subscribe to our podcast!

Share

Tags: JPA
Filed under Podcast | 1 Comment »


Dynamic enums in Java
Posted by Andrew Phillips in the wee hours: April 2nd, 2009

The introduction of Enums in Java 5 finally provided a powerful (and slightly magical) way of modelling fixed sets. One can have too much of a good thing, however, and in some situations an enum is a little too fixed to be convenient.
Here, I’d like to discuss a pattern I’ll call – for want of a better name – the dynamic enum, that addresses this issue. (more…)

Share

Tags: dynamic, enum, Java, pattern
Filed under Java | 6 Comments »

Newer posts →

Xebia Sites

  • Xebia Corporate
  • Xebia France
  • Xebia India
  • XebiCon 2012

Categories

  • Java (312)
  • Agile (192)
  • General (141)
  • Scrum (70)
  • Testing (65)
  • Architecture (65)
  • Performance (47)
  • Middleware (59)
    • Deployment (40)
  • Xebia Labs (41)
  • SOA (31)
  • Project Management (31)
  • Podcast (31)
  • Tools (28)
  • Uncategorized (24)
  • lean architecture (20)
  • Quality Assurance (19)
  • Articles (15)
  • Requirements Management (14)
  • Virtualization (21)

Tag Cloud

    lean architecture Oracle Flex ACT Ajax agile architectuur JPA implementation patterns TDD SOA Agile JPA lean architectuur Maven product owner Frameworks Javascript Grails Eclipse XML Hibernate Scrum Concurrency Control Groovy Xebia Java Scala Lean Moving to India Architecture Spring

Archives

  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
Avatars by Sterling Adventures