[ 
https://issues.apache.org/jira/browse/FELIX-3095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107936#comment-13107936
 ] 

Richard S. Hall commented on FELIX-3095:
----------------------------------------

To be clear, we are not talking about the framework at all here, we are talking 
about the launching code.

I find it hard to believe that most application servers set the user.dir 
property, since it appears to be pretty clear that you aren't supposed to do 
this. I'm not even sure how this would work since there is only one user.dir 
property; how is an application server supposed to set this for each 
application individually when more than one application is deployed?

The Felix framework has always attempted to support embedded scenarios since 
its inception and has been used in such scenarios. This is the first time this 
issue has been reported. Not that this means it isn't an issue, but it does 
give me reason to pause.

We can certainly keep this issue open, but I'll just say that any solution 
which involves setting the user.dir property is likely doomed to fail. This is 
precisely the reason why the Felix framework avoids using system properties in 
the first place, because there can only ever be one value and in embedded 
scenarios you cannot assume everyone will agree on that single value. The 
user.dir property appears to be even a worse case, since you aren't supposed to 
change it in the first place.

Please report back if you have any updates or the circumstances change. Thanks.



> FELIX running in embedded mode the File().exits() is false and the 
> File().getAbsoluteFile().exists() is true
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3095
>                 URL: https://issues.apache.org/jira/browse/FELIX-3095
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-3.2.2
>         Environment: Windows 7 32bit and 64bit: JVM 1.6.0_21
> OSX : JVM 1.6.0_26
> Running embedded Felix with Jetty 6.x 7.x and JBoss 4.2, 5.X
>            Reporter: Laszlo Hordos
>         Attachments: Screen shot 2011-08-31.png
>
>
> I have the following code in the config.properties
> felix.auto.start.1 = \
>         reference:file:bundle/init/openidm-system.jar \
> When the framework tries to find the bundle the 
> org.apache.felix.framework.cache.createRevisionFromLocation(..) line:840 
> calls the org.apache.felix.framework.util.fileExists(..) and I double checked 
> the file is there but the code did not find it.
> I noticed if I create a watch in the debugger the file.exists() it returns 
> false. If I change the watch to file.getAbsoluteFile().exists() it returns 
> true.
> I change the code everywhere to get the getAbsoluteFile always to be safe but 
> this "bug" is in the Felix. I have an issue to deploy and run the OpenIDM 
> within an embedded deployment. The code is published 
> svn co https://svn.forgerock.org/openidm/trunk/openidm-webapp/ openidm-webapp
> cd openidm-webapp
> mvn jetty:run-war

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to