I am new to Eclipselink. I wrote a couple of web services (deployed to Tomcat) using Eclipselink / Java. These web services use several entity classes. To improve the performance of web services, I try to use static weaving. I found out that I can enable this either from the command line or using the Eclipselink weave ant script. Since I use eclipse and build my WAR from eclipse, I'm not sure where to use the "weave" ant task in the Eclipse IDE. So, I tried the command line option as follows:
java org.eclipse.persistence.tools.weaving.jpa.StaticWeave -persistenceinfo c:\eclipse \workspace\employeeModel\src -classpath c:\eclipse\workspace\employeeModel\src -log c:\log\weave.log -loglevel FINEST c:\eclipse\workspace\employeeModel\src c:\eclipse \workspace\employeeModel\src
[The last two paths in the command: c: \ eclipse \ workspace \ employeeModel \ src c: \ eclipse \ workspace \ employeeModel \ src refer to the source and target, respectively]
When I ran this, he logged the following in the log file: [EL Finest]: 2012-03-05 17: 22: 49.806 - ServerSession (8880493) - Thread (Thread [main, 5, main]) - property = eclipselink.jpa .uppercase-column-names; default value = false [EL Finer]: 2012-03-05 17: 22: 49.837 - ServerSession (8880493) - Thread (Thread [main, 5, main]) - Search for the default mapping file in the file: / c: / eclipse / Workspace / employeeModel / SRC / [EL Finer]: 2012-03-05 17: 22: 49.852 - ServerSession (8880493) - Subject (Subject [main, 5, main]) - Search for the default mapping file in the file: / c: / eclipse / Workspace / employeeModel / SRC /
From the log, it looks like staticWeave did not complete successfully. But it also did not cause errors on the command line.
Since I used the same path for both the source (.java) and target, staticWeave overwrite my source files (.java files). I'm not sure if staticWeave (the command I worked on above) will create class files (.class) or overwrite the source code (.java).
I am also not sure if I did the right thing. How can I check if static weaving is really turned on? If what I did is wrong, can someone help me understand how to use the Eclipselink weave ant task in the Eclipse IDE? or the error I make in the command line option. Also, I would like to know if staticWeave will actually overwrite the source files or create byte codes (.class files).
I spent several hours to do this work, but to no avail. Can someone shed some light on this?
Appreciate your help.