You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Benedikt Ritter (Updated) (JIRA)" <ji...@apache.org> on 2012/03/08 11:56:57 UTC

[jira] [Updated] (FELIX-3379) Update extenderbased SimpleShapes example to create an embedded framework using org.osgi.framework.launch

     [ https://issues.apache.org/jira/browse/FELIX-3379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benedikt Ritter updated FELIX-3379:
-----------------------------------

    Attachment: FELIX-3379.txt

I've created a patch. Please comment!

Here's what I did:
* moved {{static void main()}} from the {{Activator}} to its own class (Application.java)
* created {{ConfigUtil}} to do setup of configuration and temporary cache dir
* create a {{FrameworkFactory}}, using a {{ServiceLoader}} (therefore the source level had to be changed to Java 6)
* Instantiate {{Activator}} and pass bundleContext from the framework to its start method
* install additional bundles (locations can be passed as command line arguments to allow different settings)

If the application is to be started from within your IDE you have to pass:
{{file:../extenderbased.circle/target/extenderbased.circle-1.0.0.jar 
file:../extenderbased.square/target/extenderbased.square-1.0.0.jar 
file:../extenderbased.triangle/target/extenderbased.triangle-1.0.0.jar}}

If you build and export the bundles so that they are all in the same directory, you simply have to call:
{{java -jar extenderbased.host file:extenderbased.circle-1.0.0.jar file:extenderbased.square-1.0.0.jar file:extenderbased.triangle-1.0.0.jar}}

Regards,
Benedikt
                
> Update extenderbased SimpleShapes example to create an embedded framework using org.osgi.framework.launch
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3379
>                 URL: https://issues.apache.org/jira/browse/FELIX-3379
>             Project: Felix
>          Issue Type: Improvement
>            Reporter: Benedikt Ritter
>            Priority: Trivial
>         Attachments: FELIX-3379.txt
>
>
> As suggested in FELIX-3375 and discussed in the ML (http://www.mail-archive.com/dev@felix.apache.org/msg24668.html), the SimpleShape example should be changed to create an embedded framework in a non-Felix-specific way, using org.osgi.framework.launch

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira