[JBoss Tools] New message: "Re: Switching seam debug mode"
by Max Andersen
User development,
A new message was posted in the thread "Switching seam debug mode":
http://community.jboss.org/message/523029#523029
Author : Max Andersen
Profile : http://community.jboss.org/people/max.andersen@jboss.com
Message:
--------------------------------------------------------------
You write "In JBoss Tools project there is no problem" I assume you mean in a seam-gen project there is no problem ?
So what is the problem you are seeing in JBoss Tools ? You have noticed that both /hot and /main ends up in /classes too, making /dev simply a redundant one which you doesn't get used when deployed ?
i.e. it works at runtime, but only issue is that /dev is also there but dead.
If what you want is simply to disable the hot dir then in JBoss Tools 3.1.x you can use the module assembly page to remove the /dev copying or if you are in 3.0.x or sooner you can edit the .settings/*wtp*components*.xml file manually and remove the /dev reference.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523029#523029
15 years
[JBoss Tools] New message: "Switching seam debug mode"
by Piotr Sobczyk
User development,
A new message was posted in the thread "Switching seam debug mode":
http://community.jboss.org/message/523017#523017
Author : Piotr Sobczyk
Profile : http://community.jboss.org/people/piotr.sobczyk
Message:
--------------------------------------------------------------
The problem with seam debug mode is that when you change it to false all classes inside "hot" source directory start to be useless (when debug="false" there is no hot deployment and WEB-INF/dev directory of application is ignored). In JBoss Tools project there is no problem because it's enought to set action.dir=/WEB-INF/classes (instead of /WEB-INF/dev/) in build.properties file. JBoss Tools project is not driven by Ant script so the problem can't be solved by changing property. Is there any easy solution in JBoss Tools that allows changing debug to false without manually copying all source files from "hot" source direcotry to "main" source directory?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523017#523017
15 years
[EJB 3.0] New message: "EJB3 slower than EJB2"
by No Name
User development,
A new message was posted in the thread "EJB3 slower than EJB2":
http://community.jboss.org/message/523003#523003
Author : No Name
Profile : http://community.jboss.org/people/ekric
Message:
--------------------------------------------------------------
Hi everybody,
im currently working on an Migration Project from EJB2 to EJB3. Now I'm doing some testing and this problem is driving me crazy.
I'm using JBoss 5.1.0.GA and an Oracle Database Version 11g.
In the each Session Bean I have a method who is doing a create. And the task is to do a create 10000 times in a row. Once in EJB2 (old Version) once in EJB3 (new version). And to my suprise the EJB2-create-Method is nearly twice as fast: *31 Seconds in EJB2 compared to 67 Seconds in EJB3. How is that?* I've tried a lot of things: Changed Transaction Types, Tested JBoss 6, etc.
What is interesting: I've mesured the Data going from the Client to the Server and back. Result: The Data beeing received by the Client is nearly the same. But the Data beeing send to the server, during the process, is aprox. double! When I use a local JBoss Server an the remote Oracle Database, the Process is getting faster in EJB3. Makes sense. Can you tell me why the amount of Data is so different? Is there so much more Overhead in EJB3?
I have a very simple testing example in EJB3: Remote Interface -> Session Bean -> Entity Bean.
I'm using a JUnit Test-Case which does the following in each Version (2/3):
+/**
*
* @throws Exception
*/
public void testCreateEJB3() throws Exception {
+ +EntityBean bean = new EntityBean();+
+ for (int i = 0; i < id_neu.length; i++) {
id_new[i] = Remote.++createBean++(++bean++);
}
}+
"id_new.lenght" is 10000.
*This is the create-Method:*
+@Stateless
++public class ...Bean$$$ implements ...Remote$$$ {+
+ @PersistenceContext
EntityManager em;+
+ public Integer createBean() {
Integer number = new Integer(1);
EntityBean bean = new EntityBean();+
+ if (this.selectMaxID() == null) {
number = 1;
} else {
number = this.selectMaxID().intValue() + 1;
}+
+ bean.setId(number);+
+ em.persist(bean);
bean.setBLocked(true);
return bean.getId();
}+
+ ...+
+}+
*The selectMaxID-Method. It gets the smallest possible ID from the Database.*
+public Integer selectMaxID() {
Query query = em
.createQuery("SELECT max(u.id) FROM xyz u");
Integer maxID = (Integer) query.getSingleResult();
return maxID;
}+
So to the EJB2 Version: There is a Delegate-Class who uses a Session Facade Bean and the "Dto"-Pattern-Object to create the Entity...
+public Integer createBean(xyzDto+ +xyz++Dto) throws EJBException {
Integer nPrimaryKey;
if (xyzDto == null) {
}
try {
+ +Xyz+ +xyz+ += xyzHome.create();
setXyzFromXyzDto(++xyz++,+ +xyz+Dto+);
nPrimaryKey = new Integer(((Integer)+ +xyz++.getPrimaryKey()).intValue());
+ +xyz++.setBLocked(true);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
return nPrimaryKey;
}+
... and in the ejbCreate of the Entity there is the same "selectMaxID" (same SQL Statement) as mentioned before.
+public Integer ejbCreate() throws CreateException {
Integer number = new Integer(1);
try {
+ +number+ += this.ejbSelectMaxID().intValue() + 1;
} catch (Exception e) {
}
setId(++number++);
return null;
}+
I hope you have any ideas why the new Version is so slow. I'm sorry if I forgot to provide any data or if this post is in the wrong format.
Thank you.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523003#523003
15 years