[ 
https://issues.apache.org/jira/browse/OWB-480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923698#action_12923698
 ] 

David Jencks commented on OWB-480:
----------------------------------

The current OWB strategy is to use the thread context classloader to look for 
META-INF/openwebbeans.properties files, and if there is none use the 
openwebbeans-impl jar's classloader.

In a reasonable app server (despite the problems I ran into not currently 
including geronimo I think) the application or thread context classloader is 
not going to expose the OWB classes to the application, so any OWB.properties 
files in OWB itself won't get picked up.  You'll only get any that happen to be 
in the application itself.  While allowing customization of a particular app in 
this way might be reasonable requiring it for every app as the complete OWB 
configuration certainly isn't.

in an osgi environment, the alternative of using the OWB-impl jar classloader 
is only going to give you the OWB.properties file actually in OWB-impl.jar.

As a result of these problems currently geronimo is configuring OWB using code 
like

OpenWebBeansConfiguration.getInstance().setProperty("foo", "bar");


> Avoid a couple NPEs
> -------------------
>
>                 Key: OWB-480
>                 URL: https://issues.apache.org/jira/browse/OWB-480
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-480.patch
>
>
> I've found 2 possible NPE;s:
> 1. in an OSGI environment, its quite possible that no openwebbeans.properties 
> files will be located, so you get a null properties object and 
> OpenWebBeansConfiguration will have a null Properties leading to big problems.
> 2. in WebContainerLifecycle, the claim that it's a jsp app by configuration 
> might be wrong.  If there's no jsp factory, no need to throw an NPE.

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

Reply via email to