OFBiz
  1. OFBiz
  2. OFBIZ-2348

I would like to use OFBiz as OSGI

    Details

    • Type: Wish Wish
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: SVN trunk
    • Fix Version/s: SVN trunk
    • Component/s: ALL COMPONENTS
    • Labels:
      None
    • Environment:

      software platform

      Description

      I would like to use OFBiz as OSGI (Equinox or Apache Felix). My problem is when I edit a little java code in my componet, I must compile all component (if it depend on main build file such common.xml or main ant task) and restart ofbiz. It spend a lot of time for me. If OFBiz as OSGI, It can start separate component and reload only jar file that you just compile any time. If OFBiz use Equinox, It can integrated with Eclipse RCP. I had tried to do that. It work.

      I would like to OFBiz distributer distribute OSGI feature to trunk. Thank you.

        Activity

        Hide
        Vikas Mayur added a comment -

        It would depend on in which component java code is being edited, since components are compiled in certain order because of dependency.

        IMO, individual components can still be compiled by using

        ofbiz$ ant -f applications/party/build.xml

        A ant target can be added which would take the component name as argument and then only the specified component will be compiled.

        Show
        Vikas Mayur added a comment - It would depend on in which component java code is being edited, since components are compiled in certain order because of dependency. IMO, individual components can still be compiled by using ofbiz$ ant -f applications/party/build.xml A ant target can be added which would take the component name as argument and then only the specified component will be compiled.
        Hide
        Ashish Vijaywargiya added a comment -

        >> A ant target can be added which would take the component name as argument and then only the specified component will be compiled.

        +1 for this comment.


        Ashish

        Show
        Ashish Vijaywargiya added a comment - >> A ant target can be added which would take the component name as argument and then only the specified component will be compiled. +1 for this comment. – Ashish
        Hide
        Chatree Srichart added a comment -

        Thanks Vikas...
        But I still would like to use OFBiz as OSGI for other purposes.

        Show
        Chatree Srichart added a comment - Thanks Vikas... But I still would like to use OFBiz as OSGI for other purposes.
        Hide
        Vikas Mayur added a comment -

        Hi Chatree,

        Can you please share any article on OSGI working that you are trying to implement.

        Thanks,
        Vikas

        Show
        Vikas Mayur added a comment - Hi Chatree, Can you please share any article on OSGI working that you are trying to implement. Thanks, Vikas
        Hide
        Chatree Srichart added a comment -

        Hi Vikas,

        First, I don't want restart OFBiz when I edit java code. Second, I would like to run eclipse RCP from OFBiz Framework. I used to try run osgi equinox from ofbiz container that I implemented. The big problem is I can not use classpath of OFBiz , so I can not use delegator, dispatcher or security object in eclipse RCP to reference OFBiz resources.

        Thanks,
        Chatree

        Show
        Chatree Srichart added a comment - Hi Vikas, First, I don't want restart OFBiz when I edit java code. Second, I would like to run eclipse RCP from OFBiz Framework. I used to try run osgi equinox from ofbiz container that I implemented. The big problem is I can not use classpath of OFBiz , so I can not use delegator, dispatcher or security object in eclipse RCP to reference OFBiz resources. Thanks, Chatree
        Hide
        Raj Saini added a comment -

        I have created a experimental OFBiz and OSGI integration project on sourceforge at http://sourceforge.net/projects/ofbiz-osgi. OFbiz is bundled as OSGi Bungle (Big one at the moment). Project uses Eclipse Equinox as OSGi Kernel and all OFBiz dependencies and OFBiz itself is a OSGi bundle. This is just a proof of concept and can really help OFBiz to adapt OSGi based kernel. Few advantages of OSGi kernel could be:

        Modularity container for OFBiz component/applications. All OFBiz components will be OSGi bundles and deployable as single units instead of a monolithic application.

        Automatic dependency management of component. Stopping/undeploying will automatically stop/un-deploy dependent components.

        Start, stop, load, refresh, update the applications in a running container without the need of restarting the server.

        Dependency injection using OSGi services

        Easier integration with other OSGi based application such as ServiceMix V4

        Show
        Raj Saini added a comment - I have created a experimental OFBiz and OSGI integration project on sourceforge at http://sourceforge.net/projects/ofbiz-osgi . OFbiz is bundled as OSGi Bungle (Big one at the moment). Project uses Eclipse Equinox as OSGi Kernel and all OFBiz dependencies and OFBiz itself is a OSGi bundle. This is just a proof of concept and can really help OFBiz to adapt OSGi based kernel. Few advantages of OSGi kernel could be: Modularity container for OFBiz component/applications. All OFBiz components will be OSGi bundles and deployable as single units instead of a monolithic application. Automatic dependency management of component. Stopping/undeploying will automatically stop/un-deploy dependent components. Start, stop, load, refresh, update the applications in a running container without the need of restarting the server. Dependency injection using OSGi services Easier integration with other OSGi based application such as ServiceMix V4
        Hide
        Jacques Le Roux added a comment -

        Hi Raj,

        Despite not much interest so far, I agree that this could be interesting, sure!
        But I guess you should not expect much help from the commnity which is focused on other objectives at the moment.

        Show
        Jacques Le Roux added a comment - Hi Raj, Despite not much interest so far, I agree that this could be interesting, sure! But I guess you should not expect much help from the commnity which is focused on other objectives at the moment.
        Hide
        Raj Saini added a comment -

        Hi Jacques,

        I understand what you mean and the pre-occupation of the community. This is not something can happen quickly. You can think of it a new generation of OFBiz like most of the open source or commercial Java EE application server vendors are moving to OSGi based kernels.

        Good thing about it is it can co-exists with the current OFBiz. For example, the prototype I created did not change a single line of the code in OFBiz. Community can keep doing what is being done and at the same time create OSGi bundles of the existing application which is mostly a build time effort. This is how other projects like ActiveMQ enabling themselves to be used inside OSGi containers.

        Show
        Raj Saini added a comment - Hi Jacques, I understand what you mean and the pre-occupation of the community. This is not something can happen quickly. You can think of it a new generation of OFBiz like most of the open source or commercial Java EE application server vendors are moving to OSGi based kernels. Good thing about it is it can co-exists with the current OFBiz. For example, the prototype I created did not change a single line of the code in OFBiz. Community can keep doing what is being done and at the same time create OSGi bundles of the existing application which is mostly a build time effort. This is how other projects like ActiveMQ enabling themselves to be used inside OSGi containers.
        Hide
        Jacques Le Roux added a comment -

        Thanks Raj,

        Your work in this area would be much appreciated, at least on my side.

        Show
        Jacques Le Roux added a comment - Thanks Raj, Your work in this area would be much appreciated, at least on my side.
        Hide
        Pierre Smits added a comment - - edited

        Maybe a separate branch should be created?

        So that development can be tracked with existing tools (JIRA) and developers and users stay informed through one communication channel in stead of setting up a separate project on an other platform (sourceforge)?

        Regards,

        Pierre

        Show
        Pierre Smits added a comment - - edited Maybe a separate branch should be created? So that development can be tracked with existing tools (JIRA) and developers and users stay informed through one communication channel in stead of setting up a separate project on an other platform (sourceforge)? Regards, Pierre
        Hide
        Raj Saini added a comment -

        Creating a branch is a good idea. However, it is possible for this code to co exists within the trunk as major work is creating OSGi bundles from the current code base. It would involve using a build tool like Maven for creating the OSGi bundle bundles. GenericDelagator and LocalDispatcher may also need to be modified to allow each OFBiz component to be bundled as OSGI bundle. This will make the OFBiz very modular with clear dependency among various components.

        Reason for hosting on SourceForge was for people to download and try as it was too big to attach to a Jira issue. Also, code is licensed under Apache 2.0 and should not be a problem to bring it into the Apache OFBiz.

        Show
        Raj Saini added a comment - Creating a branch is a good idea. However, it is possible for this code to co exists within the trunk as major work is creating OSGi bundles from the current code base. It would involve using a build tool like Maven for creating the OSGi bundle bundles. GenericDelagator and LocalDispatcher may also need to be modified to allow each OFBiz component to be bundled as OSGI bundle. This will make the OFBiz very modular with clear dependency among various components. Reason for hosting on SourceForge was for people to download and try as it was too big to attach to a Jira issue. Also, code is licensed under Apache 2.0 and should not be a problem to bring it into the Apache OFBiz.
        Hide
        Adrian Crum added a comment -

        I have been looking at the possibility of including OSGi in the framework design I proposed (https://cwiki.apache.org/confluence/display/OFBADMIN/Another+Framework+Vision) and I agree that using OSGi would improve modularity and dependency management.

        Show
        Adrian Crum added a comment - I have been looking at the possibility of including OSGi in the framework design I proposed ( https://cwiki.apache.org/confluence/display/OFBADMIN/Another+Framework+Vision ) and I agree that using OSGi would improve modularity and dependency management.
        Hide
        Jacques Le Roux added a comment -

        Modularity at the language level might prove also interesting for OFBiz (just cross readed)

        But we need to wait: http://www.javacodegeeks.com/2012/01/java-8-status-updates.html

        Show
        Jacques Le Roux added a comment - Modularity at the language level might prove also interesting for OFBiz (just cross readed) But we need to wait: http://www.javacodegeeks.com/2012/01/java-8-status-updates.html
        Hide
        Adrian Crum added a comment -

        Why do we need to wait? I don't see anything in that article about OSGi.

        Show
        Adrian Crum added a comment - Why do we need to wait? I don't see anything in that article about OSGi.
        Hide
        Jacques Le Roux added a comment -

        We need to wait if we want ot use modularity at the language level because it will be only available with Java 8.

        I dit not mean to wait and to not use OSGI. I just wanted to express a possible future alternative.

        Show
        Jacques Le Roux added a comment - We need to wait if we want ot use modularity at the language level because it will be only available with Java 8. I dit not mean to wait and to not use OSGI. I just wanted to express a possible future alternative.

          People

          • Assignee:
            Unassigned
            Reporter:
            Chatree Srichart
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development