Archive for December, 2009

Why I Hate Weblogic Integration

December 22, 2009 1 comment

This is a running post, as i go along with my current task of trying to use WLI i’m pretty sure i will be adding items to this list:

  • WorkShop – What a bloated and buggy piece of crap. This is probably the worst part till now.
    • I guess its too much to ask for a software to give reasons for not working but eh, here are some i have found:
      • Don’t put your workspace on a path with spaces or strange letters(like ó)
      • If trying to create to create a task plan workshop refuses to responde to next your trying to create the plan in the wrong folder
  • Transformations – grrrrrr… trying to debug these things is the worst thing i’ve had to do. want to know why? because i can’t…
  • It’s really hard to understand why we should even use this crap, and why do people around the world actually consider this as added value….

Extending EJB3 Objects

December 2, 2009 Leave a comment

Small and fast tip.

In order to be able to extend an EJB Entity object (be it a main object or a primary key embbedable) you need to write the MappedSuperclass anotation in the super class.

The following is taken from hibernate documentation :

public class BaseEntity {
    public Date getLastUpdate() { ... }
    public String getLastUpdater() { ... }

@Entity class Order extends BaseEntity {
    @Id public Integer getId() { ... }

Some other notes taken from the documentation :

  • Properties from superclasses not mapped as @MappedSuperclass are ignored;
  • The access type (field or methods), is inherited from the root entity, unless you use the Hibernate annotation @AccessType;
  • Any class in the hierarchy non annotated with @MappedSuperclass nor @Entity will be ignored.

Read the documentation to understand it fully : chapter

Please note that even though i’ve used the Hibernate documentation as a reference this anotation also exists in javax.persistence so it can be used with JPA

Categories: ejb3, java Tags: , ,