[arquillian-issues] [JBoss JIRA] Issue Comment Edited: (ARQ-308) Patch to support OpenEJB 3.2 API change

Dan Allen (JIRA) jira-events at lists.jboss.org
Wed Oct 6 22:05:40 EDT 2010


    [ https://jira.jboss.org/browse/ARQ-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555762#action_12555762 ] 

Dan Allen edited comment on ARQ-308 at 10/6/10 10:05 PM:
---------------------------------------------------------

David says,

"Not sure if this helps, but I added in 3.1.3 a 'public void destroyApplication(AppInfo appInfo) throws UndeployException' method to Assembler.  That method is actually there pre-3.1.3, but it is scoped 'private'.  Would still involve a little reflection, but maybe better?"

That would be an ideal solution for future proofing our adapter. I'm thinking we compile against 3.1.3 and use destroyApplication(AppInfo). We'll put a try/catch around that call to catch the NoSuchMethodException for pre-3.1.3 runtimes. In the catch block, we'll use reflection to get AppInfo.jarPath value and call destroyApplication(String path).


      was (Author: dan.j.allen):
    David says,

"Not sure if this helps, but I added in 3.1.3 a 'public void destroyApplication(AppInfo appInfo) throws UndeployException' method to Assembler.  That method is actually there pre-3.1.3, but it is scoped 'private'.  Would still involve a little reflection, but maybe better?"

That would be an ideal solution for future proofing our adapter. I'm thinking we compile against 3.1.3 and use destroyApplication(AppInfo). We'll put a try/catch around that call to catch the NoSuchMethodException. In the catch block, we'll use reflection to get AppInfo.jarPath value and call destroyApplication(String path).

  
> Patch to support OpenEJB 3.2 API change
> ---------------------------------------
>
>                 Key: ARQ-308
>                 URL: https://jira.jboss.org/browse/ARQ-308
>             Project: Arquillian
>          Issue Type: Patch
>          Components: OpenEJB Containers
>    Affects Versions: 1.0.0.Alpha4
>            Reporter: Dan Allen
>             Fix For: 1.0.0.Beta1
>
>         Attachments: ARQ-308.patch
>
>
> The Arquillian Embedded OpenEJB 3.1 container adapter works with OpenEJB 3.2 with the exception of one field reference. The public field AppInfo#jarPath was renamed to AppInfo#path. Attached is a patch which will determine the correct field name through reflection so both APIs can be supported.
> Keep in mind that OpenEJB 3.2 is still unreleased, so this is an enabling change (enables people to use it), and may be unnecessary if we find out why the field name was change. Or, perhaps, this issue will lead to an upstream change that makes this patch unnecessary. Either way, it would be nice to be able to use OpenEJB 3.2 as it supports JPA 2.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list