'3. Implementation/OSGI'에 해당되는 글 5건

  1. 2014.11.29 Bndtools
  2. 2014.11.25 Support telnet on OSGI Console
  3. 2014.11.25 Modularizing existing web applications with OSGi
  4. 2014.11.24 Target Definition
  5. 2014.11.22 OSGI Useful commands
2014. 11. 29. 03:01

Bndtools

It seems to be very helpful when developing the OSGI bundle.


http://bndtools.org/


The easy, powerful and productive way to develop with OSGi. Based on bnd and Eclipse.


2014. 11. 25. 06:51

Support telnet on OSGI Console

Type the following command at the OSGI console.



 

osgi> telnetd --port 1234 start

telnetd is running on 127.0.0.1:1234

osgi>

 


Reference : http://books.google.co.kr/books?id=zgBcBAAAQBAJ&pg=PT255&lpg=PT255&dq=connect+to+equinox+console+using+telnet&source=bl&ots=JE0yDkexpm&sig=ad3nta5ZKFZx9ZIk9h41YlIotu8&hl=ko&sa=X&ei=2aNzVMH0CoqX8QWEsoDYDw&ved=0CDQQ6AEwAzgK#v=onepage&q=connect%20to%20equinox%20console%20using%20telnet&f=false

2014. 11. 25. 06:26

Modularizing existing web applications with OSGi

The following site gives good explanation and examples to show how to modularize existing web applications with OSGI.


http://server.dzone.com/articles/modularizing-existing-web


To make examples to be run, the point is that you should make the new Target definition which loads bundles under [example]/rsp_repository/rsp_target_platform.


and don't forget to copy org.eclipse.pde.http.ui_1.0.0.jar file to the dropins folder under eclipse installed folder.


The following picture shows example.



rsp4j-example-workspace.zip




2014. 11. 24. 03:19

Target Definition

Target definition can be added by 


Windows > Preferences > Plug-in Development > Target Platform menu.




: Reload command is useful when you copied some bundle to plugin folder newly.


: In the case of locations, variables can be used as below





ex) ${project_loc}\lib 


ex) ${eclipse_home} 



If you specify import packages in the MANIFEST.MF file as below,


Import-Package:

javax.servlet.jsp.jstl.fmt



If no problem is, the specified jar will be added to the Plug-in Dependencies.





If not, check if the jar file including that package is in the target definition folder. This validation can be run at the "Run configuration" dialog as well.


2014. 11. 22. 07:17

OSGI Useful commands


help 


: lists all available commands


ss | grep text


: lists services which matches with text


bundle [bundle id]


: prints detailed information like Id,Status, Data Root and etc.


b [build id]


: prints all meta data related to this bundle


update [bundle id]


: applies newest bundle


diag [bundle id]


: prints diagnose messages


packages [package name]


: lists all the bundles which use the given package. Wild card can be used at package name.


install file:[file path]


: install a bundle into running OSGI environment. 


* [bundle symbolic name] also can be sued instead of [bundle id]



* And more useful console


CommandDescription
startStarts a bundle given an ID or symbolic name
stopStops a bundle given an ID or symbolic name
installAdds a bundle given a URL for the current instance
uninstallRemoves a bundle given a URL for the current instance
updateUpdates a bundle given a URL for the current instance
activeLists all active bundles in the current instance
headersList the headers for a bundle given an ID or symbolic name
ssLists a short status of all the bundles registered in the current instance
services <filter>Lists services given the proper filter
diagRuns diagnostics on a bundle given an ID or symbolic name


Refer : 

http://www.ibm.com/developerworks/library/os-ecl-osgiconsole/

http://isurues.wordpress.com/2009/01/01/useful-equinox-osgi-commands/