[opencms-dev] OpenJPA integration
Matthias Steinböck
matthias.steinboeck at knallgrau.at
Fri Jul 15 12:43:22 CEST 2011
Hi!
Thank you for your reply! Let me describe my setup:
I use Eclipse and added a clean (original) Tomcat 6.0.32 as Server Runtime.
My project is a dynamic web project. i added it as resource to the server.
In my persistence.xml i removed all configuration (openjpa.RuntimeUnenhancedClasses, openjpa.DynamicEnhancementAgent) to force the default-configuration.
When i start the server from eclipse successfully log in, switch to the administration-point that uses the JPA-Entities, i get the following warning in my log:
120 VoestalpineUnit INFO [http-8080-12] openjpa.Runtime - Starting OpenJPA 2.1.0
420 VoestalpineUnit INFO [http-8080-12] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary" (MySQL 5.1.44 ,MySQL-AB JDBC Driver mysql-connector-java-5.0.7 ( $Date: 2007-03-09 22:13:57 +0100 (Fri, 09 Mar 2007) $, $Revision: 6341 $ )).
1043 VoestalpineUnit WARN [http-8080-12] openjpa.Enhance - Creating subclass for "[class com.voestalpine.model.DownloadCategory, class com.voestalpine.model.Resource]". This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
Am i wrong in thinking that this means OpenJPA uses Runtime-Enhancement here?
When i add
-javaagent:/absolute_path/trunk/web/WEB-INF/lib/openjpa-all-2.1.0.jar
to my run-configuration the server starts with a bunch of error messages (attached).
maybe you can give me some hints? what am i doing wrong?
thanks in advance,
matthias
Am 15.07.2011 um 11:34 schrieb Georgi Naplatanov:
> Hi Matthias.
>
> I didn't understand why enhancement does not work for you.
>
> For build time enhancement you can see OpenCms' build.xml as example
> (task openjpac, openjpac tag).
>
> For runtime enhancement you have to add
> "-javaagent:/pat_to_openjpa/openjpa-version.jar" to command line that
> starts JSP/Servlet container.
>
> In case of application server you have to do nothing, it enhance
> entities automatically.
>
> Best regards
> Georgi
>
> On 07/15/2011 11:56 AM, � wrote:
>> Hi!
>>
>> I already had the book, but in fact didn't read it carefully enough to
>> find what i needed. Finally my Resource-Taging-Extension works like a
>> charm. To save the tags i use OpenJPA which in fact also works nicely
>> beside one fact: OpenJPA needs build-time enhancement to support lazy
>> loading. I simply don't get it to work. Runtime-enhancement does not
>> work as expected.
>>
>> Although they say that they support on-deploy-enhancement it does not
>> really seem to work. The relevant chapter in the OpenJPA-Documentation:
>> http://openjpa.apache.org/builds/2.1.0/apache-openjpa-2.1.0/docs/manual/ref_guide_pc_enhance.html
>>
>> Maybe there is somebody who already worked with openjpa?
>>
>> thanks in advance,
>> ma
>>
>> Am 08.07.2011 um 08:22 schrieb Schliemann, Kai:
>>
>>> Hi Matthias,
>>> welcome to the mailinglist.
>>> There is a whole chapter about this subject in the OpenCms 7 book
>>> written by Dan Liliedahl
>>> (http://www.packtpub.com/opencms-7-development/book)
>>>
>>> HTH
>>>
>>> Best regards
>>>
>>> Kai
>>>
>>> -----Urspr�ngliche Nachricht-----
>>> Von: opencms-dev-bounces at opencms.org
>>> <mailto:opencms-dev-bounces at opencms.org>
>>> [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Matthias Steinb�ck
>>> Gesendet: Donnerstag, 7. Juli 2011 10:24
>>> An: opencms-dev at opencms.org <mailto:opencms-dev at opencms.org>
>>> Betreff: [opencms-dev] OpenCms Administrative Point Documentation
>>>
>>> Hi!
>>>
>>> I'm new on this mailinglist, so: hi there! :)
>>>
>>> I'm not a newbie to OpenCms, but do not have much experience in
>>> creating new administrative points in the administrative view.
>>>
>>> Since I have to write a new administrative point, i'd like to ask, if
>>> there are any examples or if there is documentation on this topic. In
>>> the moment I'm hurdling with overwriting
>>> CmsListDialog.executeListMultiActions and forwarding the list of
>>> selected items to the next dialog...
>>>
>>> any help, links or examples?
>>>
>>> thanks a lot!
>>>
>>> Matthias
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>> --
>>
>> Matthias Steinb�ck
>> Development
>> ----------------------------------------------------
>> vi knallgrau GmbH
>> Pezzlgasse 7/1
>> A-1170 Wien
>> fon: 0043.1.5227637 (- 145)
>> fax: 0043.1.5227638
>> http://www.knallgrau.at
>>
>> Knallgrau Corporate Blog: http://www.knallgrau.at/company/weblog
>> Die besten Videos zu Web 2.0 und Social Media: http://www.knallgrau.tv
>> ----------------------------------------------------
>> *Wir erweitern unser Team:
>> *jobs at knallgrau.at <mailto:jobs at knallgrau.at> Infos auf:
>> http://www.knallgrau.at/company/jobs
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
--
Matthias Steinböck
Development
----------------------------------------------------
vi knallgrau GmbH
Pezzlgasse 7/1
A-1170 Wien
fon: 0043.1.5227637 (- 145)
fax: 0043.1.5227638
http://www.knallgrau.at
Knallgrau Corporate Blog: http://www.knallgrau.at/company/weblog
Die besten Videos zu Web 2.0 und Social Media: http://www.knallgrau.tv
----------------------------------------------------
Wir erweitern unser Team:
jobs at knallgrau.at Infos auf: http://www.knallgrau.at/company/jobs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110715/6f4b8318/attachment.htm>
More information about the opencms-dev
mailing list