[jboss-user] [EJB 3.0] New message: "Re: EJB3 slower than EJB2"

No Name do-not-reply at jboss.com
Sun Jan 31 11:57:36 EST 2010


User development,

A new message was posted in the thread "EJB3 slower than EJB2":

http://community.jboss.org/message/523203#523203

Author  : No Name
Profile : http://community.jboss.org/people/ekric

Message:
--------------------------------------------------------------
Thanks for your respond. What difference do you mean? It takes longer (almost twice as long) for the 10000 creates to finish in EJB3.

As you can see in my first post.
 
I'm using normal Entity Beans in both Versions.
 
*EJB3:*
 
+package de.ibs.profi.hilfetext;+
 
+import java.sql.Date;+
 
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;+
 
+ at Table(name = "...")
@Entity(name = "...")
public class ...$$$ implements java.io.Serializable {+
 
+    /**
     * private static final long serialVersionUID = -5953089278565486983L;
     */+
 
+    boolean bLocked;
    private Integer id;
    ...
+
 
+    public void setBLocked(boolean bLocked) {
        this.bLocked = bLocked;
    }+
 
+   
+
+     ...
+ 
+    @Id
    @Column(name = "ID")
    public Integer getId() {
        return id;
    }+
 
+    @Transient
    public boolean getBLocked() {
        return bLocked;
    }+
 
+   ...
}+
 
*EJB2:*
 
+package ...;+
 
+import javax.ejb.EJBLocalObject;
import java.sql.Date;+
 
+public interface ... extends EJBLocalObject {+
 
+  public void setBLocked(boolean bLocked);+
 
+  public boolean getBLocked();
+
 
+     ...+
+}+
+
+
+package de.ibs.pakt.hilfetext;+
 
+import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.CreateException;
import javax.ejb.RemoveException;
import java.sql.Date;
import javax.ejb.FinderException;
import java.util.Collection;+
 
+public abstract class ...Bean implements EntityBean {+
 
+  EntityContext entityContext;
  boolean bLocked;+
 
+  public Integer ejbCreate() throws CreateException {
+
+...+
+}+
 
I hope that answers your question.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/523203#523203




More information about the jboss-user mailing list