You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2010/11/22 20:49:13 UTC

[jira] Created: (OPENJPA-1895) Minor reflection performance improvement.

Minor reflection performance improvement.
-----------------------------------------

                 Key: OPENJPA-1895
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1895
             Project: OpenJPA
          Issue Type: Improvement
          Components: performance
    Affects Versions: 2.1.0
            Reporter: Rick Curtis
            Assignee: Rick Curtis
             Fix For: 2.1.0


With this JIRA I'm going to call .setAccessable(true) on a number of the Reflection objects in the code base. This will be a very minor performance improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-1895) Minor reflection performance improvement.

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935655#action_12935655 ] 

Albert Lee commented on OPENJPA-1895:
-------------------------------------

Getting the following Java 2 security exception after the setAccessibility() calls are introduced:

Caused by: java.security.AccessControlException: Access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)
	at java.security.AccessController.checkPermission(AccessController.java:108)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
	at com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java:212)
	at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:118)
	at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.(ConfiguringConnectionDecorator.java:49)
	... 45 more

	at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.(ConfiguringConnectionDecorator.java:51)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
	at org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:212)
	at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:733)
......
Caused by: java.lang.RuntimeException: There were errors initializing your configuration: java.lang.ExceptionInInitializerError
	at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.(ConfiguringConnectionDecorator.java:51)
	at java.lang.J9VMInternals.initializeImpl(Native Method)

Need to enclose with doPriv, e.g. 

    AccessController.doPrivileged(J2DoPrivHelper.setAccessibleAction(ao, true)):

> Minor reflection performance improvement.
> -----------------------------------------
>
>                 Key: OPENJPA-1895
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1895
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: performance
>    Affects Versions: 2.1.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.1.0
>
>
> With this JIRA I'm going to call .setAccessable(true) on a number of the Reflection objects in the code base. This will be a very minor performance improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENJPA-1895) Minor reflection performance improvement.

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis closed OPENJPA-1895.
--------------------------------

    Resolution: Fixed

Committed revision 1037873 to trunk.

> Minor reflection performance improvement.
> -----------------------------------------
>
>                 Key: OPENJPA-1895
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1895
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: performance
>    Affects Versions: 2.1.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.1.0
>
>
> With this JIRA I'm going to call .setAccessable(true) on a number of the Reflection objects in the code base. This will be a very minor performance improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.