Loading standard web application

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Loading standard web application

James Yong-2
Hi all,

I am looking into allowing OFBiz to load standard web application where there is no controller.xml and the jar files residing in web-inf/lib folder.  

Proposing to add an attribute named 'type' to the 'webapp' tag at ofbiz-component.xml, i.e.

<webapp name="myapp"
        type="standard"  <--------------- new proposed attribute
        title="Myapp"
        server="myapp-server"
        location="webapp/myapp"
        mount-point="/myapp"/>

This new attribute will help to differentiate standard web applications from those in OFBiz, and allows Catalina Container to load them accordingly.
When type="standard", will load as standard web application.
When type is empty, load according to OFBiz way.

Any feedback is welcome.

Regards,
James Yong

Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

Jacques Le Roux
Administrator
Hi James,

Here again a POC is welcome.

Jacques


Le 05/05/2017 à 10:35, James Yong a écrit :

> Hi all,
>
> I am looking into allowing OFBiz to load standard web application where there is no controller.xml and the jar files residing in web-inf/lib folder.
>
> Proposing to add an attribute named 'type' to the 'webapp' tag at ofbiz-component.xml, i.e.
>
> <webapp name="myapp"
>          type="standard"  <--------------- new proposed attribute
>          title="Myapp"
>          server="myapp-server"
>          location="webapp/myapp"
>          mount-point="/myapp"/>
>
> This new attribute will help to differentiate standard web applications from those in OFBiz, and allows Catalina Container to load them accordingly.
> When type="standard", will load as standard web application.
> When type is empty, load according to OFBiz way.
>
> Any feedback is welcome.
>
> Regards,
> James Yong
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

taher
In reply to this post by James Yong-2
This topic is very much linked to the previous thread that you started
earleri "Tomcat SSO" so they might as well be one topic. I think I answered
most stuff in that thread.

However, I would add that in my opinion, maybe it would be simpler if we
avoid implementing it in this fashion (ofbiz webapp + standard webapp) but
instead treat all of OFBiz as a single webapp by refactoring the catalina
container. Having two ways of doing the same thing is perhaps an added
complexity and more cognitive load on people for no added value that I can
think of. Unifying, on the other hand, would be a huge added value IMO.

My 2 cents .. and thank you for bringing up this discussion

On Fri, May 5, 2017 at 11:35 AM, James Yong <[hidden email]> wrote:

> Hi all,
>
> I am looking into allowing OFBiz to load standard web application where
> there is no controller.xml and the jar files residing in web-inf/lib folder.
>
> Proposing to add an attribute named 'type' to the 'webapp' tag at
> ofbiz-component.xml, i.e.
>
> <webapp name="myapp"
>         type="standard"  <--------------- new proposed attribute
>         title="Myapp"
>         server="myapp-server"
>         location="webapp/myapp"
>         mount-point="/myapp"/>
>
> This new attribute will help to differentiate standard web applications
> from those in OFBiz, and allows Catalina Container to load them accordingly.
> When type="standard", will load as standard web application.
> When type is empty, load according to OFBiz way.
>
> Any feedback is welcome.
>
> Regards,
> James Yong
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

James Yong-2
Hi Taher,

I am trying to develop an OFBiz plugin that consists of
a) Camunda workflow engine (published as a WAR); and
b) OFBiz web app that make use of the workflow engine.

Allowing OFBiz to load standard web applications will allow me to achieve the above setup using only 1 plugin, making things easy for end-users. They only need to download that plugin, and not worry about deploying the Camunda workflow engine (published as a WAR) on his/her own, as the WAR file can be downloaded automatically via gradle script during OFBiz starting up.

Regards,
James Yong

On 2017-05-05 18:07 (+0800), Taher Alkhateeb <[hidden email]> wrote:

> This topic is very much linked to the previous thread that you started
> earleri "Tomcat SSO" so they might as well be one topic. I think I answered
> most stuff in that thread.
>
> However, I would add that in my opinion, maybe it would be simpler if we
> avoid implementing it in this fashion (ofbiz webapp + standard webapp) but
> instead treat all of OFBiz as a single webapp by refactoring the catalina
> container. Having two ways of doing the same thing is perhaps an added
> complexity and more cognitive load on people for no added value that I can
> think of. Unifying, on the other hand, would be a huge added value IMO.
>
> My 2 cents .. and thank you for bringing up this discussion
>
> On Fri, May 5, 2017 at 11:35 AM, James Yong <[hidden email]> wrote:
>
> > Hi all,
> >
> > I am looking into allowing OFBiz to load standard web application where
> > there is no controller.xml and the jar files residing in web-inf/lib folder.
> >
> > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > ofbiz-component.xml, i.e.
> >
> > <webapp name="myapp"
> >         type="standard"  <--------------- new proposed attribute
> >         title="Myapp"
> >         server="myapp-server"
> >         location="webapp/myapp"
> >         mount-point="/myapp"/>
> >
> > This new attribute will help to differentiate standard web applications
> > from those in OFBiz, and allows Catalina Container to load them accordingly.
> > When type="standard", will load as standard web application.
> > When type is empty, load according to OFBiz way.
> >
> > Any feedback is welcome.
> >
> > Regards,
> > James Yong
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

taher
Hmmm, I'm not sure, but on first glance I'm not sure the best way to
integrate is by dropping in a war file? Maybe a more robust solution is to
have an integration with the engine on the API level and instantiate it
from within OFBiz within its own control servlet. For example, take a look
at how BIRT is deployed.

So yeah my proposal is more work, but a cleaner integration solution IMHO.

On Fri, May 5, 2017 at 8:06 PM, James Yong <[hidden email]> wrote:

> Hi Taher,
>
> I am trying to develop an OFBiz plugin that consists of
> a) Camunda workflow engine (published as a WAR); and
> b) OFBiz web app that make use of the workflow engine.
>
> Allowing OFBiz to load standard web applications will allow me to achieve
> the above setup using only 1 plugin, making things easy for end-users. They
> only need to download that plugin, and not worry about deploying the
> Camunda workflow engine (published as a WAR) on his/her own, as the WAR
> file can be downloaded automatically via gradle script during OFBiz
> starting up.
>
> Regards,
> James Yong
>
> On 2017-05-05 18:07 (+0800), Taher Alkhateeb <[hidden email]>
> wrote:
> > This topic is very much linked to the previous thread that you started
> > earleri "Tomcat SSO" so they might as well be one topic. I think I
> answered
> > most stuff in that thread.
> >
> > However, I would add that in my opinion, maybe it would be simpler if we
> > avoid implementing it in this fashion (ofbiz webapp + standard webapp)
> but
> > instead treat all of OFBiz as a single webapp by refactoring the catalina
> > container. Having two ways of doing the same thing is perhaps an added
> > complexity and more cognitive load on people for no added value that I
> can
> > think of. Unifying, on the other hand, would be a huge added value IMO.
> >
> > My 2 cents .. and thank you for bringing up this discussion
> >
> > On Fri, May 5, 2017 at 11:35 AM, James Yong <[hidden email]>
> wrote:
> >
> > > Hi all,
> > >
> > > I am looking into allowing OFBiz to load standard web application where
> > > there is no controller.xml and the jar files residing in web-inf/lib
> folder.
> > >
> > > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > > ofbiz-component.xml, i.e.
> > >
> > > <webapp name="myapp"
> > >         type="standard"  <--------------- new proposed attribute
> > >         title="Myapp"
> > >         server="myapp-server"
> > >         location="webapp/myapp"
> > >         mount-point="/myapp"/>
> > >
> > > This new attribute will help to differentiate standard web applications
> > > from those in OFBiz, and allows Catalina Container to load them
> accordingly.
> > > When type="standard", will load as standard web application.
> > > When type is empty, load according to OFBiz way.
> > >
> > > Any feedback is welcome.
> > >
> > > Regards,
> > > James Yong
> > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

James Yong-2
Hi Taher,

Thank you also for the thoughts shared in the 'Loading standard web application' and opening the discussion.

Instead of converting OFBiz fully into a single web application, i suggest we can have build functions:
1. to compile OFBiz into a WAR. This build-WAR function is optional and used only when the developer needs to deploy OFBiz WAR in a separate Servlet Container. Only the necessary files will be added to the WAR file.
2. For deployment to different SIT / UAT / Production environment.
3. Accessed through Screens with OFBiz standalone running. i am thinking of a studio plugin but will discuss it another time.

I haven't looked at Birt but i guess it can be embedded into an existing web application. Some apps like CAS SSO doesn't allow embedding out of the box and has to be run as a standard web application.

When using OFBiz WAR, any standard web applications dependency can be deployed alongside. So should be no problem to support the loading of standard web application in the plugins in OFBiz standalone.

There should also be no impact if we add Tomcat SSO now. When deployed as OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements will be specific to the J2EE container or via another standard web application like CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve the problems listed in https://issues.apache.org/jira/browse/OFBIZ-6963

Regards,
James Yong

On 2017-05-06 09:37 (+0800), Taher Alkhateeb <[hidden email]> wrote:

> Hmmm, I'm not sure, but on first glance I'm not sure the best way to
> integrate is by dropping in a war file? Maybe a more robust solution is to
> have an integration with the engine on the API level and instantiate it
> from within OFBiz within its own control servlet. For example, take a look
> at how BIRT is deployed.
>
> So yeah my proposal is more work, but a cleaner integration solution IMHO.
>
> On Fri, May 5, 2017 at 8:06 PM, James Yong <[hidden email]> wrote:
>
> > Hi Taher,
> >
> > I am trying to develop an OFBiz plugin that consists of
> > a) Camunda workflow engine (published as a WAR); and
> > b) OFBiz web app that make use of the workflow engine.
> >
> > Allowing OFBiz to load standard web applications will allow me to achieve
> > the above setup using only 1 plugin, making things easy for end-users. They
> > only need to download that plugin, and not worry about deploying the
> > Camunda workflow engine (published as a WAR) on his/her own, as the WAR
> > file can be downloaded automatically via gradle script during OFBiz
> > starting up.
> >
> > Regards,
> > James Yong
> >
> > On 2017-05-05 18:07 (+0800), Taher Alkhateeb <[hidden email]>
> > wrote:
> > > This topic is very much linked to the previous thread that you started
> > > earleri "Tomcat SSO" so they might as well be one topic. I think I
> > answered
> > > most stuff in that thread.
> > >
> > > However, I would add that in my opinion, maybe it would be simpler if we
> > > avoid implementing it in this fashion (ofbiz webapp + standard webapp)
> > but
> > > instead treat all of OFBiz as a single webapp by refactoring the catalina
> > > container. Having two ways of doing the same thing is perhaps an added
> > > complexity and more cognitive load on people for no added value that I
> > can
> > > think of. Unifying, on the other hand, would be a huge added value IMO.
> > >
> > > My 2 cents .. and thank you for bringing up this discussion
> > >
> > > On Fri, May 5, 2017 at 11:35 AM, James Yong <[hidden email]>
> > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am looking into allowing OFBiz to load standard web application where
> > > > there is no controller.xml and the jar files residing in web-inf/lib
> > folder.
> > > >
> > > > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > > > ofbiz-component.xml, i.e.
> > > >
> > > > <webapp name="myapp"
> > > >         type="standard"  <--------------- new proposed attribute
> > > >         title="Myapp"
> > > >         server="myapp-server"
> > > >         location="webapp/myapp"
> > > >         mount-point="/myapp"/>
> > > >
> > > > This new attribute will help to differentiate standard web applications
> > > > from those in OFBiz, and allows Catalina Container to load them
> > accordingly.
> > > > When type="standard", will load as standard web application.
> > > > When type is empty, load according to OFBiz way.
> > > >
> > > > Any feedback is welcome.
> > > >
> > > > Regards,
> > > > James Yong
> > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

taher
Hi James,

I guess we can start discussing this at a more detailed level once you have
a PoC or more elaborate exploration of the exact "why" and "how". All good
initiatives !

Cheers,

Taher Alkhateeb

On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]> wrote:

> Hi Taher,
>
> Thank you also for the thoughts shared in the 'Loading standard web
> application' and opening the discussion.
>
> Instead of converting OFBiz fully into a single web application, i suggest
> we can have build functions:
> 1. to compile OFBiz into a WAR. This build-WAR function is optional and
> used only when the developer needs to deploy OFBiz WAR in a separate
> Servlet Container. Only the necessary files will be added to the WAR file.
> 2. For deployment to different SIT / UAT / Production environment.
> 3. Accessed through Screens with OFBiz standalone running. i am thinking
> of a studio plugin but will discuss it another time.
>
> I haven't looked at Birt but i guess it can be embedded into an existing
> web application. Some apps like CAS SSO doesn't allow embedding out of the
> box and has to be run as a standard web application.
>
> When using OFBiz WAR, any standard web applications dependency can be
> deployed alongside. So should be no problem to support the loading of
> standard web application in the plugins in OFBiz standalone.
>
> There should also be no impact if we add Tomcat SSO now. When deployed as
> OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements will be
> specific to the J2EE container or via another standard web application like
> CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve the
> problems listed in https://issues.apache.org/jira/browse/OFBIZ-6963
>
> Regards,
> James Yong
>
> On 2017-05-06 09:37 (+0800), Taher Alkhateeb <[hidden email]>
> wrote:
> > Hmmm, I'm not sure, but on first glance I'm not sure the best way to
> > integrate is by dropping in a war file? Maybe a more robust solution is
> to
> > have an integration with the engine on the API level and instantiate it
> > from within OFBiz within its own control servlet. For example, take a
> look
> > at how BIRT is deployed.
> >
> > So yeah my proposal is more work, but a cleaner integration solution
> IMHO.
> >
> > On Fri, May 5, 2017 at 8:06 PM, James Yong <[hidden email]> wrote:
> >
> > > Hi Taher,
> > >
> > > I am trying to develop an OFBiz plugin that consists of
> > > a) Camunda workflow engine (published as a WAR); and
> > > b) OFBiz web app that make use of the workflow engine.
> > >
> > > Allowing OFBiz to load standard web applications will allow me to
> achieve
> > > the above setup using only 1 plugin, making things easy for end-users.
> They
> > > only need to download that plugin, and not worry about deploying the
> > > Camunda workflow engine (published as a WAR) on his/her own, as the WAR
> > > file can be downloaded automatically via gradle script during OFBiz
> > > starting up.
> > >
> > > Regards,
> > > James Yong
> > >
> > > On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
> [hidden email]>
> > > wrote:
> > > > This topic is very much linked to the previous thread that you
> started
> > > > earleri "Tomcat SSO" so they might as well be one topic. I think I
> > > answered
> > > > most stuff in that thread.
> > > >
> > > > However, I would add that in my opinion, maybe it would be simpler
> if we
> > > > avoid implementing it in this fashion (ofbiz webapp + standard
> webapp)
> > > but
> > > > instead treat all of OFBiz as a single webapp by refactoring the
> catalina
> > > > container. Having two ways of doing the same thing is perhaps an
> added
> > > > complexity and more cognitive load on people for no added value that
> I
> > > can
> > > > think of. Unifying, on the other hand, would be a huge added value
> IMO.
> > > >
> > > > My 2 cents .. and thank you for bringing up this discussion
> > > >
> > > > On Fri, May 5, 2017 at 11:35 AM, James Yong <[hidden email]>
> > > wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > I am looking into allowing OFBiz to load standard web application
> where
> > > > > there is no controller.xml and the jar files residing in
> web-inf/lib
> > > folder.
> > > > >
> > > > > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > > > > ofbiz-component.xml, i.e.
> > > > >
> > > > > <webapp name="myapp"
> > > > >         type="standard"  <--------------- new proposed attribute
> > > > >         title="Myapp"
> > > > >         server="myapp-server"
> > > > >         location="webapp/myapp"
> > > > >         mount-point="/myapp"/>
> > > > >
> > > > > This new attribute will help to differentiate standard web
> applications
> > > > > from those in OFBiz, and allows Catalina Container to load them
> > > accordingly.
> > > > > When type="standard", will load as standard web application.
> > > > > When type is empty, load according to OFBiz way.
> > > > >
> > > > > Any feedback is welcome.
> > > > >
> > > > > Regards,
> > > > > James Yong
> > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

James Yong-2
Thanks Taher.

Those are the big pictures. For now, need to work on the smaller issues.
So I will start with the patch for the loading of standard web application.

Regards,
James Yong

On 2017-05-06 18:48 (+0800), Taher Alkhateeb <[hidden email]> wrote:

> Hi James,
>
> I guess we can start discussing this at a more detailed level once you have
> a PoC or more elaborate exploration of the exact "why" and "how". All good
> initiatives !
>
> Cheers,
>
> Taher Alkhateeb
>
> On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]> wrote:
>
> > Hi Taher,
> >
> > Thank you also for the thoughts shared in the 'Loading standard web
> > application' and opening the discussion.
> >
> > Instead of converting OFBiz fully into a single web application, i suggest
> > we can have build functions:
> > 1. to compile OFBiz into a WAR. This build-WAR function is optional and
> > used only when the developer needs to deploy OFBiz WAR in a separate
> > Servlet Container. Only the necessary files will be added to the WAR file.
> > 2. For deployment to different SIT / UAT / Production environment.
> > 3. Accessed through Screens with OFBiz standalone running. i am thinking
> > of a studio plugin but will discuss it another time.
> >
> > I haven't looked at Birt but i guess it can be embedded into an existing
> > web application. Some apps like CAS SSO doesn't allow embedding out of the
> > box and has to be run as a standard web application.
> >
> > When using OFBiz WAR, any standard web applications dependency can be
> > deployed alongside. So should be no problem to support the loading of
> > standard web application in the plugins in OFBiz standalone.
> >
> > There should also be no impact if we add Tomcat SSO now. When deployed as
> > OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements will be
> > specific to the J2EE container or via another standard web application like
> > CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve the
> > problems listed in https://issues.apache.org/jira/browse/OFBIZ-6963
> >
> > Regards,
> > James Yong
> >
> > On 2017-05-06 09:37 (+0800), Taher Alkhateeb <[hidden email]>
> > wrote:
> > > Hmmm, I'm not sure, but on first glance I'm not sure the best way to
> > > integrate is by dropping in a war file? Maybe a more robust solution is
> > to
> > > have an integration with the engine on the API level and instantiate it
> > > from within OFBiz within its own control servlet. For example, take a
> > look
> > > at how BIRT is deployed.
> > >
> > > So yeah my proposal is more work, but a cleaner integration solution
> > IMHO.
> > >
> > > On Fri, May 5, 2017 at 8:06 PM, James Yong <[hidden email]> wrote:
> > >
> > > > Hi Taher,
> > > >
> > > > I am trying to develop an OFBiz plugin that consists of
> > > > a) Camunda workflow engine (published as a WAR); and
> > > > b) OFBiz web app that make use of the workflow engine.
> > > >
> > > > Allowing OFBiz to load standard web applications will allow me to
> > achieve
> > > > the above setup using only 1 plugin, making things easy for end-users.
> > They
> > > > only need to download that plugin, and not worry about deploying the
> > > > Camunda workflow engine (published as a WAR) on his/her own, as the WAR
> > > > file can be downloaded automatically via gradle script during OFBiz
> > > > starting up.
> > > >
> > > > Regards,
> > > > James Yong
> > > >
> > > > On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
> > [hidden email]>
> > > > wrote:
> > > > > This topic is very much linked to the previous thread that you
> > started
> > > > > earleri "Tomcat SSO" so they might as well be one topic. I think I
> > > > answered
> > > > > most stuff in that thread.
> > > > >
> > > > > However, I would add that in my opinion, maybe it would be simpler
> > if we
> > > > > avoid implementing it in this fashion (ofbiz webapp + standard
> > webapp)
> > > > but
> > > > > instead treat all of OFBiz as a single webapp by refactoring the
> > catalina
> > > > > container. Having two ways of doing the same thing is perhaps an
> > added
> > > > > complexity and more cognitive load on people for no added value that
> > I
> > > > can
> > > > > think of. Unifying, on the other hand, would be a huge added value
> > IMO.
> > > > >
> > > > > My 2 cents .. and thank you for bringing up this discussion
> > > > >
> > > > > On Fri, May 5, 2017 at 11:35 AM, James Yong <[hidden email]>
> > > > wrote:
> > > > >
> > > > > > Hi all,
> > > > > >
> > > > > > I am looking into allowing OFBiz to load standard web application
> > where
> > > > > > there is no controller.xml and the jar files residing in
> > web-inf/lib
> > > > folder.
> > > > > >
> > > > > > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > > > > > ofbiz-component.xml, i.e.
> > > > > >
> > > > > > <webapp name="myapp"
> > > > > >         type="standard"  <--------------- new proposed attribute
> > > > > >         title="Myapp"
> > > > > >         server="myapp-server"
> > > > > >         location="webapp/myapp"
> > > > > >         mount-point="/myapp"/>
> > > > > >
> > > > > > This new attribute will help to differentiate standard web
> > applications
> > > > > > from those in OFBiz, and allows Catalina Container to load them
> > > > accordingly.
> > > > > > When type="standard", will load as standard web application.
> > > > > > When type is empty, load according to OFBiz way.
> > > > > >
> > > > > > Any feedback is welcome.
> > > > > >
> > > > > > Regards,
> > > > > > James Yong
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

James Yong-2
Created a JIRA issue and upload a patch at
https://issues.apache.org/jira/browse/OFBIZ-9347

On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]> wrote:

> Thanks Taher.
>
> Those are the big pictures. For now, need to work on the smaller issues.
> So I will start with the patch for the loading of standard web application.
>
> Regards,
> James Yong
>
> On 2017-05-06 18:48 (+0800), Taher Alkhateeb <[hidden email]> wrote:
> > Hi James,
> >
> > I guess we can start discussing this at a more detailed level once you have
> > a PoC or more elaborate exploration of the exact "why" and "how". All good
> > initiatives !
> >
> > Cheers,
> >
> > Taher Alkhateeb
> >
> > On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]> wrote:
> >
> > > Hi Taher,
> > >
> > > Thank you also for the thoughts shared in the 'Loading standard web
> > > application' and opening the discussion.
> > >
> > > Instead of converting OFBiz fully into a single web application, i suggest
> > > we can have build functions:
> > > 1. to compile OFBiz into a WAR. This build-WAR function is optional and
> > > used only when the developer needs to deploy OFBiz WAR in a separate
> > > Servlet Container. Only the necessary files will be added to the WAR file.
> > > 2. For deployment to different SIT / UAT / Production environment.
> > > 3. Accessed through Screens with OFBiz standalone running. i am thinking
> > > of a studio plugin but will discuss it another time.
> > >
> > > I haven't looked at Birt but i guess it can be embedded into an existing
> > > web application. Some apps like CAS SSO doesn't allow embedding out of the
> > > box and has to be run as a standard web application.
> > >
> > > When using OFBiz WAR, any standard web applications dependency can be
> > > deployed alongside. So should be no problem to support the loading of
> > > standard web application in the plugins in OFBiz standalone.
> > >
> > > There should also be no impact if we add Tomcat SSO now. When deployed as
> > > OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements will be
> > > specific to the J2EE container or via another standard web application like
> > > CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve the
> > > problems listed in https://issues.apache.org/jira/browse/OFBIZ-6963
> > >
> > > Regards,
> > > James Yong
> > >
> > > On 2017-05-06 09:37 (+0800), Taher Alkhateeb <[hidden email]>
> > > wrote:
> > > > Hmmm, I'm not sure, but on first glance I'm not sure the best way to
> > > > integrate is by dropping in a war file? Maybe a more robust solution is
> > > to
> > > > have an integration with the engine on the API level and instantiate it
> > > > from within OFBiz within its own control servlet. For example, take a
> > > look
> > > > at how BIRT is deployed.
> > > >
> > > > So yeah my proposal is more work, but a cleaner integration solution
> > > IMHO.
> > > >
> > > > On Fri, May 5, 2017 at 8:06 PM, James Yong <[hidden email]> wrote:
> > > >
> > > > > Hi Taher,
> > > > >
> > > > > I am trying to develop an OFBiz plugin that consists of
> > > > > a) Camunda workflow engine (published as a WAR); and
> > > > > b) OFBiz web app that make use of the workflow engine.
> > > > >
> > > > > Allowing OFBiz to load standard web applications will allow me to
> > > achieve
> > > > > the above setup using only 1 plugin, making things easy for end-users.
> > > They
> > > > > only need to download that plugin, and not worry about deploying the
> > > > > Camunda workflow engine (published as a WAR) on his/her own, as the WAR
> > > > > file can be downloaded automatically via gradle script during OFBiz
> > > > > starting up.
> > > > >
> > > > > Regards,
> > > > > James Yong
> > > > >
> > > > > On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
> > > [hidden email]>
> > > > > wrote:
> > > > > > This topic is very much linked to the previous thread that you
> > > started
> > > > > > earleri "Tomcat SSO" so they might as well be one topic. I think I
> > > > > answered
> > > > > > most stuff in that thread.
> > > > > >
> > > > > > However, I would add that in my opinion, maybe it would be simpler
> > > if we
> > > > > > avoid implementing it in this fashion (ofbiz webapp + standard
> > > webapp)
> > > > > but
> > > > > > instead treat all of OFBiz as a single webapp by refactoring the
> > > catalina
> > > > > > container. Having two ways of doing the same thing is perhaps an
> > > added
> > > > > > complexity and more cognitive load on people for no added value that
> > > I
> > > > > can
> > > > > > think of. Unifying, on the other hand, would be a huge added value
> > > IMO.
> > > > > >
> > > > > > My 2 cents .. and thank you for bringing up this discussion
> > > > > >
> > > > > > On Fri, May 5, 2017 at 11:35 AM, James Yong <[hidden email]>
> > > > > wrote:
> > > > > >
> > > > > > > Hi all,
> > > > > > >
> > > > > > > I am looking into allowing OFBiz to load standard web application
> > > where
> > > > > > > there is no controller.xml and the jar files residing in
> > > web-inf/lib
> > > > > folder.
> > > > > > >
> > > > > > > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > > > > > > ofbiz-component.xml, i.e.
> > > > > > >
> > > > > > > <webapp name="myapp"
> > > > > > >         type="standard"  <--------------- new proposed attribute
> > > > > > >         title="Myapp"
> > > > > > >         server="myapp-server"
> > > > > > >         location="webapp/myapp"
> > > > > > >         mount-point="/myapp"/>
> > > > > > >
> > > > > > > This new attribute will help to differentiate standard web
> > > applications
> > > > > > > from those in OFBiz, and allows Catalina Container to load them
> > > > > accordingly.
> > > > > > > When type="standard", will load as standard web application.
> > > > > > > When type is empty, load according to OFBiz way.
> > > > > > >
> > > > > > > Any feedback is welcome.
> > > > > > >
> > > > > > > Regards,
> > > > > > > James Yong
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

taher
Hi James,

I saw the patch and it seems to be in proper order.

However, the issue still remains of why and what. Your patch is essentially
turning OFBiz into a partial web server by calling the "addWebapp()"
method. You want to do that so you can put an external web application
inside the code base to run side-by-side with OFBiz.

What I understand from this is that you want to have two webapps running
together, and then communicating with each other over the wire. In other
words, we have almost no integration between the two applications.

So I will try to ask this question in reverse: Why do you want to run a
standard Tomcat webapp inside OFBiz? What do you want to "share"? And also,
what is forcing to take the route of an independent webapp as opposed to an
integration solution on the API level?

On Sat, May 6, 2017 at 7:17 PM, James Yong <[hidden email]> wrote:

> Created a JIRA issue and upload a patch at
> https://issues.apache.org/jira/browse/OFBIZ-9347
>
> On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]> wrote:
> > Thanks Taher.
> >
> > Those are the big pictures. For now, need to work on the smaller issues.
> > So I will start with the patch for the loading of standard web
> application.
> >
> > Regards,
> > James Yong
> >
> > On 2017-05-06 18:48 (+0800), Taher Alkhateeb <[hidden email]>
> wrote:
> > > Hi James,
> > >
> > > I guess we can start discussing this at a more detailed level once you
> have
> > > a PoC or more elaborate exploration of the exact "why" and "how". All
> good
> > > initiatives !
> > >
> > > Cheers,
> > >
> > > Taher Alkhateeb
> > >
> > > On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]>
> wrote:
> > >
> > > > Hi Taher,
> > > >
> > > > Thank you also for the thoughts shared in the 'Loading standard web
> > > > application' and opening the discussion.
> > > >
> > > > Instead of converting OFBiz fully into a single web application, i
> suggest
> > > > we can have build functions:
> > > > 1. to compile OFBiz into a WAR. This build-WAR function is optional
> and
> > > > used only when the developer needs to deploy OFBiz WAR in a separate
> > > > Servlet Container. Only the necessary files will be added to the WAR
> file.
> > > > 2. For deployment to different SIT / UAT / Production environment.
> > > > 3. Accessed through Screens with OFBiz standalone running. i am
> thinking
> > > > of a studio plugin but will discuss it another time.
> > > >
> > > > I haven't looked at Birt but i guess it can be embedded into an
> existing
> > > > web application. Some apps like CAS SSO doesn't allow embedding out
> of the
> > > > box and has to be run as a standard web application.
> > > >
> > > > When using OFBiz WAR, any standard web applications dependency can be
> > > > deployed alongside. So should be no problem to support the loading of
> > > > standard web application in the plugins in OFBiz standalone.
> > > >
> > > > There should also be no impact if we add Tomcat SSO now. When
> deployed as
> > > > OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements will
> be
> > > > specific to the J2EE container or via another standard web
> application like
> > > > CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve the
> > > > problems listed in https://issues.apache.org/jira/browse/OFBIZ-6963
> > > >
> > > > Regards,
> > > > James Yong
> > > >
> > > > On 2017-05-06 09:37 (+0800), Taher Alkhateeb <
> [hidden email]>
> > > > wrote:
> > > > > Hmmm, I'm not sure, but on first glance I'm not sure the best way
> to
> > > > > integrate is by dropping in a war file? Maybe a more robust
> solution is
> > > > to
> > > > > have an integration with the engine on the API level and
> instantiate it
> > > > > from within OFBiz within its own control servlet. For example,
> take a
> > > > look
> > > > > at how BIRT is deployed.
> > > > >
> > > > > So yeah my proposal is more work, but a cleaner integration
> solution
> > > > IMHO.
> > > > >
> > > > > On Fri, May 5, 2017 at 8:06 PM, James Yong <[hidden email]>
> wrote:
> > > > >
> > > > > > Hi Taher,
> > > > > >
> > > > > > I am trying to develop an OFBiz plugin that consists of
> > > > > > a) Camunda workflow engine (published as a WAR); and
> > > > > > b) OFBiz web app that make use of the workflow engine.
> > > > > >
> > > > > > Allowing OFBiz to load standard web applications will allow me to
> > > > achieve
> > > > > > the above setup using only 1 plugin, making things easy for
> end-users.
> > > > They
> > > > > > only need to download that plugin, and not worry about deploying
> the
> > > > > > Camunda workflow engine (published as a WAR) on his/her own, as
> the WAR
> > > > > > file can be downloaded automatically via gradle script during
> OFBiz
> > > > > > starting up.
> > > > > >
> > > > > > Regards,
> > > > > > James Yong
> > > > > >
> > > > > > On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
> > > > [hidden email]>
> > > > > > wrote:
> > > > > > > This topic is very much linked to the previous thread that you
> > > > started
> > > > > > > earleri "Tomcat SSO" so they might as well be one topic. I
> think I
> > > > > > answered
> > > > > > > most stuff in that thread.
> > > > > > >
> > > > > > > However, I would add that in my opinion, maybe it would be
> simpler
> > > > if we
> > > > > > > avoid implementing it in this fashion (ofbiz webapp + standard
> > > > webapp)
> > > > > > but
> > > > > > > instead treat all of OFBiz as a single webapp by refactoring
> the
> > > > catalina
> > > > > > > container. Having two ways of doing the same thing is perhaps
> an
> > > > added
> > > > > > > complexity and more cognitive load on people for no added
> value that
> > > > I
> > > > > > can
> > > > > > > think of. Unifying, on the other hand, would be a huge added
> value
> > > > IMO.
> > > > > > >
> > > > > > > My 2 cents .. and thank you for bringing up this discussion
> > > > > > >
> > > > > > > On Fri, May 5, 2017 at 11:35 AM, James Yong <
> [hidden email]>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > I am looking into allowing OFBiz to load standard web
> application
> > > > where
> > > > > > > > there is no controller.xml and the jar files residing in
> > > > web-inf/lib
> > > > > > folder.
> > > > > > > >
> > > > > > > > Proposing to add an attribute named 'type' to the 'webapp'
> tag at
> > > > > > > > ofbiz-component.xml, i.e.
> > > > > > > >
> > > > > > > > <webapp name="myapp"
> > > > > > > >         type="standard"  <--------------- new proposed
> attribute
> > > > > > > >         title="Myapp"
> > > > > > > >         server="myapp-server"
> > > > > > > >         location="webapp/myapp"
> > > > > > > >         mount-point="/myapp"/>
> > > > > > > >
> > > > > > > > This new attribute will help to differentiate standard web
> > > > applications
> > > > > > > > from those in OFBiz, and allows Catalina Container to load
> them
> > > > > > accordingly.
> > > > > > > > When type="standard", will load as standard web application.
> > > > > > > > When type is empty, load according to OFBiz way.
> > > > > > > >
> > > > > > > > Any feedback is welcome.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > James Yong
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

James Yong-2
Hi Taher,

Thanks for the review.

My use case is to run CAS SSO on OFBiz, to avoid another Tomcat instance.
But I won't commit the patch if others doesn't need it.

Regards,
James Yong

PS: I can run standard web application in earlier OFBiz versions.

On 2017-05-07 14:09 (+0800), Taher Alkhateeb <[hidden email]> wrote:

> Hi James,
>
> I saw the patch and it seems to be in proper order.
>
> However, the issue still remains of why and what. Your patch is essentially
> turning OFBiz into a partial web server by calling the "addWebapp()"
> method. You want to do that so you can put an external web application
> inside the code base to run side-by-side with OFBiz.
>
> What I understand from this is that you want to have two webapps running
> together, and then communicating with each other over the wire. In other
> words, we have almost no integration between the two applications.
>
> So I will try to ask this question in reverse: Why do you want to run a
> standard Tomcat webapp inside OFBiz? What do you want to "share"? And also,
> what is forcing to take the route of an independent webapp as opposed to an
> integration solution on the API level?
>
> On Sat, May 6, 2017 at 7:17 PM, James Yong <[hidden email]> wrote:
>
> > Created a JIRA issue and upload a patch at
> > https://issues.apache.org/jira/browse/OFBIZ-9347
> >
> > On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]> wrote:
> > > Thanks Taher.
> > >
> > > Those are the big pictures. For now, need to work on the smaller issues.
> > > So I will start with the patch for the loading of standard web
> > application.
> > >
> > > Regards,
> > > James Yong
> > >
> > > On 2017-05-06 18:48 (+0800), Taher Alkhateeb <[hidden email]>
> > wrote:
> > > > Hi James,
> > > >
> > > > I guess we can start discussing this at a more detailed level once you
> > have
> > > > a PoC or more elaborate exploration of the exact "why" and "how". All
> > good
> > > > initiatives !
> > > >
> > > > Cheers,
> > > >
> > > > Taher Alkhateeb
> > > >
> > > > On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]>
> > wrote:
> > > >
> > > > > Hi Taher,
> > > > >
> > > > > Thank you also for the thoughts shared in the 'Loading standard web
> > > > > application' and opening the discussion.
> > > > >
> > > > > Instead of converting OFBiz fully into a single web application, i
> > suggest
> > > > > we can have build functions:
> > > > > 1. to compile OFBiz into a WAR. This build-WAR function is optional
> > and
> > > > > used only when the developer needs to deploy OFBiz WAR in a separate
> > > > > Servlet Container. Only the necessary files will be added to the WAR
> > file.
> > > > > 2. For deployment to different SIT / UAT / Production environment.
> > > > > 3. Accessed through Screens with OFBiz standalone running. i am
> > thinking
> > > > > of a studio plugin but will discuss it another time.
> > > > >
> > > > > I haven't looked at Birt but i guess it can be embedded into an
> > existing
> > > > > web application. Some apps like CAS SSO doesn't allow embedding out
> > of the
> > > > > box and has to be run as a standard web application.
> > > > >
> > > > > When using OFBiz WAR, any standard web applications dependency can be
> > > > > deployed alongside. So should be no problem to support the loading of
> > > > > standard web application in the plugins in OFBiz standalone.
> > > > >
> > > > > There should also be no impact if we add Tomcat SSO now. When
> > deployed as
> > > > > OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements will
> > be
> > > > > specific to the J2EE container or via another standard web
> > application like
> > > > > CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve the
> > > > > problems listed in https://issues.apache.org/jira/browse/OFBIZ-6963
> > > > >
> > > > > Regards,
> > > > > James Yong
> > > > >
> > > > > On 2017-05-06 09:37 (+0800), Taher Alkhateeb <
> > [hidden email]>
> > > > > wrote:
> > > > > > Hmmm, I'm not sure, but on first glance I'm not sure the best way
> > to
> > > > > > integrate is by dropping in a war file? Maybe a more robust
> > solution is
> > > > > to
> > > > > > have an integration with the engine on the API level and
> > instantiate it
> > > > > > from within OFBiz within its own control servlet. For example,
> > take a
> > > > > look
> > > > > > at how BIRT is deployed.
> > > > > >
> > > > > > So yeah my proposal is more work, but a cleaner integration
> > solution
> > > > > IMHO.
> > > > > >
> > > > > > On Fri, May 5, 2017 at 8:06 PM, James Yong <[hidden email]>
> > wrote:
> > > > > >
> > > > > > > Hi Taher,
> > > > > > >
> > > > > > > I am trying to develop an OFBiz plugin that consists of
> > > > > > > a) Camunda workflow engine (published as a WAR); and
> > > > > > > b) OFBiz web app that make use of the workflow engine.
> > > > > > >
> > > > > > > Allowing OFBiz to load standard web applications will allow me to
> > > > > achieve
> > > > > > > the above setup using only 1 plugin, making things easy for
> > end-users.
> > > > > They
> > > > > > > only need to download that plugin, and not worry about deploying
> > the
> > > > > > > Camunda workflow engine (published as a WAR) on his/her own, as
> > the WAR
> > > > > > > file can be downloaded automatically via gradle script during
> > OFBiz
> > > > > > > starting up.
> > > > > > >
> > > > > > > Regards,
> > > > > > > James Yong
> > > > > > >
> > > > > > > On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
> > > > > [hidden email]>
> > > > > > > wrote:
> > > > > > > > This topic is very much linked to the previous thread that you
> > > > > started
> > > > > > > > earleri "Tomcat SSO" so they might as well be one topic. I
> > think I
> > > > > > > answered
> > > > > > > > most stuff in that thread.
> > > > > > > >
> > > > > > > > However, I would add that in my opinion, maybe it would be
> > simpler
> > > > > if we
> > > > > > > > avoid implementing it in this fashion (ofbiz webapp + standard
> > > > > webapp)
> > > > > > > but
> > > > > > > > instead treat all of OFBiz as a single webapp by refactoring
> > the
> > > > > catalina
> > > > > > > > container. Having two ways of doing the same thing is perhaps
> > an
> > > > > added
> > > > > > > > complexity and more cognitive load on people for no added
> > value that
> > > > > I
> > > > > > > can
> > > > > > > > think of. Unifying, on the other hand, would be a huge added
> > value
> > > > > IMO.
> > > > > > > >
> > > > > > > > My 2 cents .. and thank you for bringing up this discussion
> > > > > > > >
> > > > > > > > On Fri, May 5, 2017 at 11:35 AM, James Yong <
> > [hidden email]>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hi all,
> > > > > > > > >
> > > > > > > > > I am looking into allowing OFBiz to load standard web
> > application
> > > > > where
> > > > > > > > > there is no controller.xml and the jar files residing in
> > > > > web-inf/lib
> > > > > > > folder.
> > > > > > > > >
> > > > > > > > > Proposing to add an attribute named 'type' to the 'webapp'
> > tag at
> > > > > > > > > ofbiz-component.xml, i.e.
> > > > > > > > >
> > > > > > > > > <webapp name="myapp"
> > > > > > > > >         type="standard"  <--------------- new proposed
> > attribute
> > > > > > > > >         title="Myapp"
> > > > > > > > >         server="myapp-server"
> > > > > > > > >         location="webapp/myapp"
> > > > > > > > >         mount-point="/myapp"/>
> > > > > > > > >
> > > > > > > > > This new attribute will help to differentiate standard web
> > > > > applications
> > > > > > > > > from those in OFBiz, and allows Catalina Container to load
> > them
> > > > > > > accordingly.
> > > > > > > > > When type="standard", will load as standard web application.
> > > > > > > > > When type is empty, load according to OFBiz way.
> > > > > > > > >
> > > > > > > > > Any feedback is welcome.
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > > James Yong
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

taher
Hi James,

Is it correct to assume that the purpose of this solution is to allow you
to login to OFBiz and other systems using a unified account? If the answer
is yes, then doesn't it seem a little strange to have that service embedded
inside OFBiz when it is serving other accounts of other systems?

Sorry for the many questions :) just trying to wrap my ahead around your
vision on this.

Cheers,

Taher

On Sun, May 7, 2017 at 9:44 AM, James Yong <[hidden email]> wrote:

> Hi Taher,
>
> Thanks for the review.
>
> My use case is to run CAS SSO on OFBiz, to avoid another Tomcat instance.
> But I won't commit the patch if others doesn't need it.
>
> Regards,
> James Yong
>
> PS: I can run standard web application in earlier OFBiz versions.
>
> On 2017-05-07 14:09 (+0800), Taher Alkhateeb <[hidden email]>
> wrote:
> > Hi James,
> >
> > I saw the patch and it seems to be in proper order.
> >
> > However, the issue still remains of why and what. Your patch is
> essentially
> > turning OFBiz into a partial web server by calling the "addWebapp()"
> > method. You want to do that so you can put an external web application
> > inside the code base to run side-by-side with OFBiz.
> >
> > What I understand from this is that you want to have two webapps running
> > together, and then communicating with each other over the wire. In other
> > words, we have almost no integration between the two applications.
> >
> > So I will try to ask this question in reverse: Why do you want to run a
> > standard Tomcat webapp inside OFBiz? What do you want to "share"? And
> also,
> > what is forcing to take the route of an independent webapp as opposed to
> an
> > integration solution on the API level?
> >
> > On Sat, May 6, 2017 at 7:17 PM, James Yong <[hidden email]> wrote:
> >
> > > Created a JIRA issue and upload a patch at
> > > https://issues.apache.org/jira/browse/OFBIZ-9347
> > >
> > > On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]> wrote:
> > > > Thanks Taher.
> > > >
> > > > Those are the big pictures. For now, need to work on the smaller
> issues.
> > > > So I will start with the patch for the loading of standard web
> > > application.
> > > >
> > > > Regards,
> > > > James Yong
> > > >
> > > > On 2017-05-06 18:48 (+0800), Taher Alkhateeb <
> [hidden email]>
> > > wrote:
> > > > > Hi James,
> > > > >
> > > > > I guess we can start discussing this at a more detailed level once
> you
> > > have
> > > > > a PoC or more elaborate exploration of the exact "why" and "how".
> All
> > > good
> > > > > initiatives !
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Taher Alkhateeb
> > > > >
> > > > > On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]>
> > > wrote:
> > > > >
> > > > > > Hi Taher,
> > > > > >
> > > > > > Thank you also for the thoughts shared in the 'Loading standard
> web
> > > > > > application' and opening the discussion.
> > > > > >
> > > > > > Instead of converting OFBiz fully into a single web application,
> i
> > > suggest
> > > > > > we can have build functions:
> > > > > > 1. to compile OFBiz into a WAR. This build-WAR function is
> optional
> > > and
> > > > > > used only when the developer needs to deploy OFBiz WAR in a
> separate
> > > > > > Servlet Container. Only the necessary files will be added to the
> WAR
> > > file.
> > > > > > 2. For deployment to different SIT / UAT / Production
> environment.
> > > > > > 3. Accessed through Screens with OFBiz standalone running. i am
> > > thinking
> > > > > > of a studio plugin but will discuss it another time.
> > > > > >
> > > > > > I haven't looked at Birt but i guess it can be embedded into an
> > > existing
> > > > > > web application. Some apps like CAS SSO doesn't allow embedding
> out
> > > of the
> > > > > > box and has to be run as a standard web application.
> > > > > >
> > > > > > When using OFBiz WAR, any standard web applications dependency
> can be
> > > > > > deployed alongside. So should be no problem to support the
> loading of
> > > > > > standard web application in the plugins in OFBiz standalone.
> > > > > >
> > > > > > There should also be no impact if we add Tomcat SSO now. When
> > > deployed as
> > > > > > OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements
> will
> > > be
> > > > > > specific to the J2EE container or via another standard web
> > > application like
> > > > > > CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve
> the
> > > > > > problems listed in https://issues.apache.org/
> jira/browse/OFBIZ-6963
> > > > > >
> > > > > > Regards,
> > > > > > James Yong
> > > > > >
> > > > > > On 2017-05-06 09:37 (+0800), Taher Alkhateeb <
> > > [hidden email]>
> > > > > > wrote:
> > > > > > > Hmmm, I'm not sure, but on first glance I'm not sure the best
> way
> > > to
> > > > > > > integrate is by dropping in a war file? Maybe a more robust
> > > solution is
> > > > > > to
> > > > > > > have an integration with the engine on the API level and
> > > instantiate it
> > > > > > > from within OFBiz within its own control servlet. For example,
> > > take a
> > > > > > look
> > > > > > > at how BIRT is deployed.
> > > > > > >
> > > > > > > So yeah my proposal is more work, but a cleaner integration
> > > solution
> > > > > > IMHO.
> > > > > > >
> > > > > > > On Fri, May 5, 2017 at 8:06 PM, James Yong <
> [hidden email]>
> > > wrote:
> > > > > > >
> > > > > > > > Hi Taher,
> > > > > > > >
> > > > > > > > I am trying to develop an OFBiz plugin that consists of
> > > > > > > > a) Camunda workflow engine (published as a WAR); and
> > > > > > > > b) OFBiz web app that make use of the workflow engine.
> > > > > > > >
> > > > > > > > Allowing OFBiz to load standard web applications will allow
> me to
> > > > > > achieve
> > > > > > > > the above setup using only 1 plugin, making things easy for
> > > end-users.
> > > > > > They
> > > > > > > > only need to download that plugin, and not worry about
> deploying
> > > the
> > > > > > > > Camunda workflow engine (published as a WAR) on his/her own,
> as
> > > the WAR
> > > > > > > > file can be downloaded automatically via gradle script during
> > > OFBiz
> > > > > > > > starting up.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > James Yong
> > > > > > > >
> > > > > > > > On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
> > > > > > [hidden email]>
> > > > > > > > wrote:
> > > > > > > > > This topic is very much linked to the previous thread that
> you
> > > > > > started
> > > > > > > > > earleri "Tomcat SSO" so they might as well be one topic. I
> > > think I
> > > > > > > > answered
> > > > > > > > > most stuff in that thread.
> > > > > > > > >
> > > > > > > > > However, I would add that in my opinion, maybe it would be
> > > simpler
> > > > > > if we
> > > > > > > > > avoid implementing it in this fashion (ofbiz webapp +
> standard
> > > > > > webapp)
> > > > > > > > but
> > > > > > > > > instead treat all of OFBiz as a single webapp by
> refactoring
> > > the
> > > > > > catalina
> > > > > > > > > container. Having two ways of doing the same thing is
> perhaps
> > > an
> > > > > > added
> > > > > > > > > complexity and more cognitive load on people for no added
> > > value that
> > > > > > I
> > > > > > > > can
> > > > > > > > > think of. Unifying, on the other hand, would be a huge
> added
> > > value
> > > > > > IMO.
> > > > > > > > >
> > > > > > > > > My 2 cents .. and thank you for bringing up this discussion
> > > > > > > > >
> > > > > > > > > On Fri, May 5, 2017 at 11:35 AM, James Yong <
> > > [hidden email]>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Hi all,
> > > > > > > > > >
> > > > > > > > > > I am looking into allowing OFBiz to load standard web
> > > application
> > > > > > where
> > > > > > > > > > there is no controller.xml and the jar files residing in
> > > > > > web-inf/lib
> > > > > > > > folder.
> > > > > > > > > >
> > > > > > > > > > Proposing to add an attribute named 'type' to the
> 'webapp'
> > > tag at
> > > > > > > > > > ofbiz-component.xml, i.e.
> > > > > > > > > >
> > > > > > > > > > <webapp name="myapp"
> > > > > > > > > >         type="standard"  <--------------- new proposed
> > > attribute
> > > > > > > > > >         title="Myapp"
> > > > > > > > > >         server="myapp-server"
> > > > > > > > > >         location="webapp/myapp"
> > > > > > > > > >         mount-point="/myapp"/>
> > > > > > > > > >
> > > > > > > > > > This new attribute will help to differentiate standard
> web
> > > > > > applications
> > > > > > > > > > from those in OFBiz, and allows Catalina Container to
> load
> > > them
> > > > > > > > accordingly.
> > > > > > > > > > When type="standard", will load as standard web
> application.
> > > > > > > > > > When type is empty, load according to OFBiz way.
> > > > > > > > > >
> > > > > > > > > > Any feedback is welcome.
> > > > > > > > > >
> > > > > > > > > > Regards,
> > > > > > > > > > James Yong
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

Michael Brohl-3
Hi James, hi Taher,

in general, I think it's helpful to have the possibility to load
applications the "Tomcat way". If you want to extend functionality by
dropping a third party WAR without setting up another Servlet container
it would be possible with this change. The patch seems to be lightweight
and if there are no unwanted side effects, why not add it?

It's much easier to do it this way instead of making OFBiz ready to be
deployed in any servlet container (I guess).

Best regards,

Michael


Am 07.05.17 um 09:23 schrieb Taher Alkhateeb:

> Hi James,
>
> Is it correct to assume that the purpose of this solution is to allow you
> to login to OFBiz and other systems using a unified account? If the answer
> is yes, then doesn't it seem a little strange to have that service embedded
> inside OFBiz when it is serving other accounts of other systems?
>
> Sorry for the many questions :) just trying to wrap my ahead around your
> vision on this.
>
> Cheers,
>
> Taher
>
> On Sun, May 7, 2017 at 9:44 AM, James Yong <[hidden email]> wrote:
>
>> Hi Taher,
>>
>> Thanks for the review.
>>
>> My use case is to run CAS SSO on OFBiz, to avoid another Tomcat instance.
>> But I won't commit the patch if others doesn't need it.
>>
>> Regards,
>> James Yong
>>
>> PS: I can run standard web application in earlier OFBiz versions.
>>
>> On 2017-05-07 14:09 (+0800), Taher Alkhateeb <[hidden email]>
>> wrote:
>>> Hi James,
>>>
>>> I saw the patch and it seems to be in proper order.
>>>
>>> However, the issue still remains of why and what. Your patch is
>> essentially
>>> turning OFBiz into a partial web server by calling the "addWebapp()"
>>> method. You want to do that so you can put an external web application
>>> inside the code base to run side-by-side with OFBiz.
>>>
>>> What I understand from this is that you want to have two webapps running
>>> together, and then communicating with each other over the wire. In other
>>> words, we have almost no integration between the two applications.
>>>
>>> So I will try to ask this question in reverse: Why do you want to run a
>>> standard Tomcat webapp inside OFBiz? What do you want to "share"? And
>> also,
>>> what is forcing to take the route of an independent webapp as opposed to
>> an
>>> integration solution on the API level?
>>>
>>> On Sat, May 6, 2017 at 7:17 PM, James Yong <[hidden email]> wrote:
>>>
>>>> Created a JIRA issue and upload a patch at
>>>> https://issues.apache.org/jira/browse/OFBIZ-9347
>>>>
>>>> On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]> wrote:
>>>>> Thanks Taher.
>>>>>
>>>>> Those are the big pictures. For now, need to work on the smaller
>> issues.
>>>>> So I will start with the patch for the loading of standard web
>>>> application.
>>>>> Regards,
>>>>> James Yong
>>>>>
>>>>> On 2017-05-06 18:48 (+0800), Taher Alkhateeb <
>> [hidden email]>
>>>> wrote:
>>>>>> Hi James,
>>>>>>
>>>>>> I guess we can start discussing this at a more detailed level once
>> you
>>>> have
>>>>>> a PoC or more elaborate exploration of the exact "why" and "how".
>> All
>>>> good
>>>>>> initiatives !
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Taher Alkhateeb
>>>>>>
>>>>>> On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]>
>>>> wrote:
>>>>>>> Hi Taher,
>>>>>>>
>>>>>>> Thank you also for the thoughts shared in the 'Loading standard
>> web
>>>>>>> application' and opening the discussion.
>>>>>>>
>>>>>>> Instead of converting OFBiz fully into a single web application,
>> i
>>>> suggest
>>>>>>> we can have build functions:
>>>>>>> 1. to compile OFBiz into a WAR. This build-WAR function is
>> optional
>>>> and
>>>>>>> used only when the developer needs to deploy OFBiz WAR in a
>> separate
>>>>>>> Servlet Container. Only the necessary files will be added to the
>> WAR
>>>> file.
>>>>>>> 2. For deployment to different SIT / UAT / Production
>> environment.
>>>>>>> 3. Accessed through Screens with OFBiz standalone running. i am
>>>> thinking
>>>>>>> of a studio plugin but will discuss it another time.
>>>>>>>
>>>>>>> I haven't looked at Birt but i guess it can be embedded into an
>>>> existing
>>>>>>> web application. Some apps like CAS SSO doesn't allow embedding
>> out
>>>> of the
>>>>>>> box and has to be run as a standard web application.
>>>>>>>
>>>>>>> When using OFBiz WAR, any standard web applications dependency
>> can be
>>>>>>> deployed alongside. So should be no problem to support the
>> loading of
>>>>>>> standard web application in the plugins in OFBiz standalone.
>>>>>>>
>>>>>>> There should also be no impact if we add Tomcat SSO now. When
>>>> deployed as
>>>>>>> OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements
>> will
>>>> be
>>>>>>> specific to the J2EE container or via another standard web
>>>> application like
>>>>>>> CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve
>> the
>>>>>>> problems listed in https://issues.apache.org/
>> jira/browse/OFBIZ-6963
>>>>>>> Regards,
>>>>>>> James Yong
>>>>>>>
>>>>>>> On 2017-05-06 09:37 (+0800), Taher Alkhateeb <
>>>> [hidden email]>
>>>>>>> wrote:
>>>>>>>> Hmmm, I'm not sure, but on first glance I'm not sure the best
>> way
>>>> to
>>>>>>>> integrate is by dropping in a war file? Maybe a more robust
>>>> solution is
>>>>>>> to
>>>>>>>> have an integration with the engine on the API level and
>>>> instantiate it
>>>>>>>> from within OFBiz within its own control servlet. For example,
>>>> take a
>>>>>>> look
>>>>>>>> at how BIRT is deployed.
>>>>>>>>
>>>>>>>> So yeah my proposal is more work, but a cleaner integration
>>>> solution
>>>>>>> IMHO.
>>>>>>>> On Fri, May 5, 2017 at 8:06 PM, James Yong <
>> [hidden email]>
>>>> wrote:
>>>>>>>>> Hi Taher,
>>>>>>>>>
>>>>>>>>> I am trying to develop an OFBiz plugin that consists of
>>>>>>>>> a) Camunda workflow engine (published as a WAR); and
>>>>>>>>> b) OFBiz web app that make use of the workflow engine.
>>>>>>>>>
>>>>>>>>> Allowing OFBiz to load standard web applications will allow
>> me to
>>>>>>> achieve
>>>>>>>>> the above setup using only 1 plugin, making things easy for
>>>> end-users.
>>>>>>> They
>>>>>>>>> only need to download that plugin, and not worry about
>> deploying
>>>> the
>>>>>>>>> Camunda workflow engine (published as a WAR) on his/her own,
>> as
>>>> the WAR
>>>>>>>>> file can be downloaded automatically via gradle script during
>>>> OFBiz
>>>>>>>>> starting up.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> James Yong
>>>>>>>>>
>>>>>>>>> On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
>>>>>>> [hidden email]>
>>>>>>>>> wrote:
>>>>>>>>>> This topic is very much linked to the previous thread that
>> you
>>>>>>> started
>>>>>>>>>> earleri "Tomcat SSO" so they might as well be one topic. I
>>>> think I
>>>>>>>>> answered
>>>>>>>>>> most stuff in that thread.
>>>>>>>>>>
>>>>>>>>>> However, I would add that in my opinion, maybe it would be
>>>> simpler
>>>>>>> if we
>>>>>>>>>> avoid implementing it in this fashion (ofbiz webapp +
>> standard
>>>>>>> webapp)
>>>>>>>>> but
>>>>>>>>>> instead treat all of OFBiz as a single webapp by
>> refactoring
>>>> the
>>>>>>> catalina
>>>>>>>>>> container. Having two ways of doing the same thing is
>> perhaps
>>>> an
>>>>>>> added
>>>>>>>>>> complexity and more cognitive load on people for no added
>>>> value that
>>>>>>> I
>>>>>>>>> can
>>>>>>>>>> think of. Unifying, on the other hand, would be a huge
>> added
>>>> value
>>>>>>> IMO.
>>>>>>>>>> My 2 cents .. and thank you for bringing up this discussion
>>>>>>>>>>
>>>>>>>>>> On Fri, May 5, 2017 at 11:35 AM, James Yong <
>>>> [hidden email]>
>>>>>>>>> wrote:
>>>>>>>>>>> Hi all,
>>>>>>>>>>>
>>>>>>>>>>> I am looking into allowing OFBiz to load standard web
>>>> application
>>>>>>> where
>>>>>>>>>>> there is no controller.xml and the jar files residing in
>>>>>>> web-inf/lib
>>>>>>>>> folder.
>>>>>>>>>>> Proposing to add an attribute named 'type' to the
>> 'webapp'
>>>> tag at
>>>>>>>>>>> ofbiz-component.xml, i.e.
>>>>>>>>>>>
>>>>>>>>>>> <webapp name="myapp"
>>>>>>>>>>>          type="standard"  <--------------- new proposed
>>>> attribute
>>>>>>>>>>>          title="Myapp"
>>>>>>>>>>>          server="myapp-server"
>>>>>>>>>>>          location="webapp/myapp"
>>>>>>>>>>>          mount-point="/myapp"/>
>>>>>>>>>>>
>>>>>>>>>>> This new attribute will help to differentiate standard
>> web
>>>>>>> applications
>>>>>>>>>>> from those in OFBiz, and allows Catalina Container to
>> load
>>>> them
>>>>>>>>> accordingly.
>>>>>>>>>>> When type="standard", will load as standard web
>> application.
>>>>>>>>>>> When type is empty, load according to OFBiz way.
>>>>>>>>>>>
>>>>>>>>>>> Any feedback is welcome.
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> James Yong
>>>>>>>>>>>
>>>>>>>>>>>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

Jacques Le Roux
Administrator
I agree with Michael,

Should we not rather exchange in the Jira or at least put a reference to this thread for easier future recall of history?

Thanks

Jacques


Le 07/05/2017 à 16:14, Michael Brohl a écrit :

> Hi James, hi Taher,
>
> in general, I think it's helpful to have the possibility to load applications the "Tomcat way". If you want to extend functionality by dropping a
> third party WAR without setting up another Servlet container it would be possible with this change. The patch seems to be lightweight and if there
> are no unwanted side effects, why not add it?
>
> It's much easier to do it this way instead of making OFBiz ready to be deployed in any servlet container (I guess).
>
> Best regards,
>
> Michael
>
>
> Am 07.05.17 um 09:23 schrieb Taher Alkhateeb:
>> Hi James,
>>
>> Is it correct to assume that the purpose of this solution is to allow you
>> to login to OFBiz and other systems using a unified account? If the answer
>> is yes, then doesn't it seem a little strange to have that service embedded
>> inside OFBiz when it is serving other accounts of other systems?
>>
>> Sorry for the many questions :) just trying to wrap my ahead around your
>> vision on this.
>>
>> Cheers,
>>
>> Taher
>>
>> On Sun, May 7, 2017 at 9:44 AM, James Yong <[hidden email]> wrote:
>>
>>> Hi Taher,
>>>
>>> Thanks for the review.
>>>
>>> My use case is to run CAS SSO on OFBiz, to avoid another Tomcat instance.
>>> But I won't commit the patch if others doesn't need it.
>>>
>>> Regards,
>>> James Yong
>>>
>>> PS: I can run standard web application in earlier OFBiz versions.
>>>
>>> On 2017-05-07 14:09 (+0800), Taher Alkhateeb <[hidden email]>
>>> wrote:
>>>> Hi James,
>>>>
>>>> I saw the patch and it seems to be in proper order.
>>>>
>>>> However, the issue still remains of why and what. Your patch is
>>> essentially
>>>> turning OFBiz into a partial web server by calling the "addWebapp()"
>>>> method. You want to do that so you can put an external web application
>>>> inside the code base to run side-by-side with OFBiz.
>>>>
>>>> What I understand from this is that you want to have two webapps running
>>>> together, and then communicating with each other over the wire. In other
>>>> words, we have almost no integration between the two applications.
>>>>
>>>> So I will try to ask this question in reverse: Why do you want to run a
>>>> standard Tomcat webapp inside OFBiz? What do you want to "share"? And
>>> also,
>>>> what is forcing to take the route of an independent webapp as opposed to
>>> an
>>>> integration solution on the API level?
>>>>
>>>> On Sat, May 6, 2017 at 7:17 PM, James Yong <[hidden email]> wrote:
>>>>
>>>>> Created a JIRA issue and upload a patch at
>>>>> https://issues.apache.org/jira/browse/OFBIZ-9347
>>>>>
>>>>> On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]> wrote:
>>>>>> Thanks Taher.
>>>>>>
>>>>>> Those are the big pictures. For now, need to work on the smaller
>>> issues.
>>>>>> So I will start with the patch for the loading of standard web
>>>>> application.
>>>>>> Regards,
>>>>>> James Yong
>>>>>>
>>>>>> On 2017-05-06 18:48 (+0800), Taher Alkhateeb <
>>> [hidden email]>
>>>>> wrote:
>>>>>>> Hi James,
>>>>>>>
>>>>>>> I guess we can start discussing this at a more detailed level once
>>> you
>>>>> have
>>>>>>> a PoC or more elaborate exploration of the exact "why" and "how".
>>> All
>>>>> good
>>>>>>> initiatives !
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> Taher Alkhateeb
>>>>>>>
>>>>>>> On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]>
>>>>> wrote:
>>>>>>>> Hi Taher,
>>>>>>>>
>>>>>>>> Thank you also for the thoughts shared in the 'Loading standard
>>> web
>>>>>>>> application' and opening the discussion.
>>>>>>>>
>>>>>>>> Instead of converting OFBiz fully into a single web application,
>>> i
>>>>> suggest
>>>>>>>> we can have build functions:
>>>>>>>> 1. to compile OFBiz into a WAR. This build-WAR function is
>>> optional
>>>>> and
>>>>>>>> used only when the developer needs to deploy OFBiz WAR in a
>>> separate
>>>>>>>> Servlet Container. Only the necessary files will be added to the
>>> WAR
>>>>> file.
>>>>>>>> 2. For deployment to different SIT / UAT / Production
>>> environment.
>>>>>>>> 3. Accessed through Screens with OFBiz standalone running. i am
>>>>> thinking
>>>>>>>> of a studio plugin but will discuss it another time.
>>>>>>>>
>>>>>>>> I haven't looked at Birt but i guess it can be embedded into an
>>>>> existing
>>>>>>>> web application. Some apps like CAS SSO doesn't allow embedding
>>> out
>>>>> of the
>>>>>>>> box and has to be run as a standard web application.
>>>>>>>>
>>>>>>>> When using OFBiz WAR, any standard web applications dependency
>>> can be
>>>>>>>> deployed alongside. So should be no problem to support the
>>> loading of
>>>>>>>> standard web application in the plugins in OFBiz standalone.
>>>>>>>>
>>>>>>>> There should also be no impact if we add Tomcat SSO now. When
>>>>> deployed as
>>>>>>>> OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements
>>> will
>>>>> be
>>>>>>>> specific to the J2EE container or via another standard web
>>>>> application like
>>>>>>>> CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve
>>> the
>>>>>>>> problems listed in https://issues.apache.org/
>>> jira/browse/OFBIZ-6963
>>>>>>>> Regards,
>>>>>>>> James Yong
>>>>>>>>
>>>>>>>> On 2017-05-06 09:37 (+0800), Taher Alkhateeb <
>>>>> [hidden email]>
>>>>>>>> wrote:
>>>>>>>>> Hmmm, I'm not sure, but on first glance I'm not sure the best
>>> way
>>>>> to
>>>>>>>>> integrate is by dropping in a war file? Maybe a more robust
>>>>> solution is
>>>>>>>> to
>>>>>>>>> have an integration with the engine on the API level and
>>>>> instantiate it
>>>>>>>>> from within OFBiz within its own control servlet. For example,
>>>>> take a
>>>>>>>> look
>>>>>>>>> at how BIRT is deployed.
>>>>>>>>>
>>>>>>>>> So yeah my proposal is more work, but a cleaner integration
>>>>> solution
>>>>>>>> IMHO.
>>>>>>>>> On Fri, May 5, 2017 at 8:06 PM, James Yong <
>>> [hidden email]>
>>>>> wrote:
>>>>>>>>>> Hi Taher,
>>>>>>>>>>
>>>>>>>>>> I am trying to develop an OFBiz plugin that consists of
>>>>>>>>>> a) Camunda workflow engine (published as a WAR); and
>>>>>>>>>> b) OFBiz web app that make use of the workflow engine.
>>>>>>>>>>
>>>>>>>>>> Allowing OFBiz to load standard web applications will allow
>>> me to
>>>>>>>> achieve
>>>>>>>>>> the above setup using only 1 plugin, making things easy for
>>>>> end-users.
>>>>>>>> They
>>>>>>>>>> only need to download that plugin, and not worry about
>>> deploying
>>>>> the
>>>>>>>>>> Camunda workflow engine (published as a WAR) on his/her own,
>>> as
>>>>> the WAR
>>>>>>>>>> file can be downloaded automatically via gradle script during
>>>>> OFBiz
>>>>>>>>>> starting up.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> James Yong
>>>>>>>>>>
>>>>>>>>>> On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
>>>>>>>> [hidden email]>
>>>>>>>>>> wrote:
>>>>>>>>>>> This topic is very much linked to the previous thread that
>>> you
>>>>>>>> started
>>>>>>>>>>> earleri "Tomcat SSO" so they might as well be one topic. I
>>>>> think I
>>>>>>>>>> answered
>>>>>>>>>>> most stuff in that thread.
>>>>>>>>>>>
>>>>>>>>>>> However, I would add that in my opinion, maybe it would be
>>>>> simpler
>>>>>>>> if we
>>>>>>>>>>> avoid implementing it in this fashion (ofbiz webapp +
>>> standard
>>>>>>>> webapp)
>>>>>>>>>> but
>>>>>>>>>>> instead treat all of OFBiz as a single webapp by
>>> refactoring
>>>>> the
>>>>>>>> catalina
>>>>>>>>>>> container. Having two ways of doing the same thing is
>>> perhaps
>>>>> an
>>>>>>>> added
>>>>>>>>>>> complexity and more cognitive load on people for no added
>>>>> value that
>>>>>>>> I
>>>>>>>>>> can
>>>>>>>>>>> think of. Unifying, on the other hand, would be a huge
>>> added
>>>>> value
>>>>>>>> IMO.
>>>>>>>>>>> My 2 cents .. and thank you for bringing up this discussion
>>>>>>>>>>>
>>>>>>>>>>> On Fri, May 5, 2017 at 11:35 AM, James Yong <
>>>>> [hidden email]>
>>>>>>>>>> wrote:
>>>>>>>>>>>> Hi all,
>>>>>>>>>>>>
>>>>>>>>>>>> I am looking into allowing OFBiz to load standard web
>>>>> application
>>>>>>>> where
>>>>>>>>>>>> there is no controller.xml and the jar files residing in
>>>>>>>> web-inf/lib
>>>>>>>>>> folder.
>>>>>>>>>>>> Proposing to add an attribute named 'type' to the
>>> 'webapp'
>>>>> tag at
>>>>>>>>>>>> ofbiz-component.xml, i.e.
>>>>>>>>>>>>
>>>>>>>>>>>> <webapp name="myapp"
>>>>>>>>>>>>          type="standard" <--------------- new proposed
>>>>> attribute
>>>>>>>>>>>>          title="Myapp"
>>>>>>>>>>>>          server="myapp-server"
>>>>>>>>>>>>          location="webapp/myapp"
>>>>>>>>>>>>          mount-point="/myapp"/>
>>>>>>>>>>>>
>>>>>>>>>>>> This new attribute will help to differentiate standard
>>> web
>>>>>>>> applications
>>>>>>>>>>>> from those in OFBiz, and allows Catalina Container to
>>> load
>>>>> them
>>>>>>>>>> accordingly.
>>>>>>>>>>>> When type="standard", will load as standard web
>>> application.
>>>>>>>>>>>> When type is empty, load according to OFBiz way.
>>>>>>>>>>>>
>>>>>>>>>>>> Any feedback is welcome.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> James Yong
>>>>>>>>>>>>
>>>>>>>>>>>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

taher
In reply to this post by Michael Brohl-3
Hey Michael, James, all

First of all, I gotta say James' efforts are awesome, keep them coming :)

The reason I am expressing concerns is the following:

- Having OFBiz act sort of like a web server might be architecturally
straining on resources (think micro-services, this is sort of the opposite)
- If we adopt a multi webapp architecture now, it might be hard to change
in the future if we decide to go with a lean architecture that loads
everything into one webapp which you can just deploy as a single jar on any
servlet container.
- If you look at the whole architecture of OFBiz, the way we launch new
processes is usually by firing up a Container (a background process or
server if you like). What we are doing here instead is starting a webapp
inside of an existing tomcat instance fired up by OFBiz. This might lock us
to tomcat only because we can no longer reverse the launch sequence (web
server starting OFBiz instead of the other way around).
- Finally, integration as far as I understand it happens in multiple ways,
but I'm not familiar with this one. For example, you can integrate by:
  - Having some kind of engine, and firing it up from your application
using special API (provided by you or the engine vendor like in BIRT)
  - Having two separate systems talking to each other over the network
using REST or something like that.

So although the work being done is kind of cool, I worry it might lock us
down in the future. But hey, if people feel good about it, then it might be
worth introducing.

Either way, again thank you for all the work James! :)

Cheers,

Taher Alkhateeb

On Sun, May 7, 2017 at 5:14 PM, Michael Brohl <[hidden email]>
wrote:

> Hi James, hi Taher,
>
> in general, I think it's helpful to have the possibility to load
> applications the "Tomcat way". If you want to extend functionality by
> dropping a third party WAR without setting up another Servlet container it
> would be possible with this change. The patch seems to be lightweight and
> if there are no unwanted side effects, why not add it?
>
> It's much easier to do it this way instead of making OFBiz ready to be
> deployed in any servlet container (I guess).
>
> Best regards,
>
> Michael
>
>
> Am 07.05.17 um 09:23 schrieb Taher Alkhateeb:
>
> Hi James,
>>
>> Is it correct to assume that the purpose of this solution is to allow you
>> to login to OFBiz and other systems using a unified account? If the answer
>> is yes, then doesn't it seem a little strange to have that service
>> embedded
>> inside OFBiz when it is serving other accounts of other systems?
>>
>> Sorry for the many questions :) just trying to wrap my ahead around your
>> vision on this.
>>
>> Cheers,
>>
>> Taher
>>
>> On Sun, May 7, 2017 at 9:44 AM, James Yong <[hidden email]> wrote:
>>
>> Hi Taher,
>>>
>>> Thanks for the review.
>>>
>>> My use case is to run CAS SSO on OFBiz, to avoid another Tomcat instance.
>>> But I won't commit the patch if others doesn't need it.
>>>
>>> Regards,
>>> James Yong
>>>
>>> PS: I can run standard web application in earlier OFBiz versions.
>>>
>>> On 2017-05-07 14:09 (+0800), Taher Alkhateeb <[hidden email]
>>> >
>>> wrote:
>>>
>>>> Hi James,
>>>>
>>>> I saw the patch and it seems to be in proper order.
>>>>
>>>> However, the issue still remains of why and what. Your patch is
>>>>
>>> essentially
>>>
>>>> turning OFBiz into a partial web server by calling the "addWebapp()"
>>>> method. You want to do that so you can put an external web application
>>>> inside the code base to run side-by-side with OFBiz.
>>>>
>>>> What I understand from this is that you want to have two webapps running
>>>> together, and then communicating with each other over the wire. In other
>>>> words, we have almost no integration between the two applications.
>>>>
>>>> So I will try to ask this question in reverse: Why do you want to run a
>>>> standard Tomcat webapp inside OFBiz? What do you want to "share"? And
>>>>
>>> also,
>>>
>>>> what is forcing to take the route of an independent webapp as opposed to
>>>>
>>> an
>>>
>>>> integration solution on the API level?
>>>>
>>>> On Sat, May 6, 2017 at 7:17 PM, James Yong <[hidden email]>
>>>> wrote:
>>>>
>>>> Created a JIRA issue and upload a patch at
>>>>> https://issues.apache.org/jira/browse/OFBIZ-9347
>>>>>
>>>>> On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]> wrote:
>>>>>
>>>>>> Thanks Taher.
>>>>>>
>>>>>> Those are the big pictures. For now, need to work on the smaller
>>>>>>
>>>>> issues.
>>>
>>>> So I will start with the patch for the loading of standard web
>>>>>>
>>>>> application.
>>>>>
>>>>>> Regards,
>>>>>> James Yong
>>>>>>
>>>>>> On 2017-05-06 18:48 (+0800), Taher Alkhateeb <
>>>>>>
>>>>> [hidden email]>
>>>
>>>> wrote:
>>>>>
>>>>>> Hi James,
>>>>>>>
>>>>>>> I guess we can start discussing this at a more detailed level once
>>>>>>>
>>>>>> you
>>>
>>>> have
>>>>>
>>>>>> a PoC or more elaborate exploration of the exact "why" and "how".
>>>>>>>
>>>>>> All
>>>
>>>> good
>>>>>
>>>>>> initiatives !
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> Taher Alkhateeb
>>>>>>>
>>>>>>> On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]>
>>>>>>>
>>>>>> wrote:
>>>>>
>>>>>> Hi Taher,
>>>>>>>>
>>>>>>>> Thank you also for the thoughts shared in the 'Loading standard
>>>>>>>>
>>>>>>> web
>>>
>>>> application' and opening the discussion.
>>>>>>>>
>>>>>>>> Instead of converting OFBiz fully into a single web application,
>>>>>>>>
>>>>>>> i
>>>
>>>> suggest
>>>>>
>>>>>> we can have build functions:
>>>>>>>> 1. to compile OFBiz into a WAR. This build-WAR function is
>>>>>>>>
>>>>>>> optional
>>>
>>>> and
>>>>>
>>>>>> used only when the developer needs to deploy OFBiz WAR in a
>>>>>>>>
>>>>>>> separate
>>>
>>>> Servlet Container. Only the necessary files will be added to the
>>>>>>>>
>>>>>>> WAR
>>>
>>>> file.
>>>>>
>>>>>> 2. For deployment to different SIT / UAT / Production
>>>>>>>>
>>>>>>> environment.
>>>
>>>> 3. Accessed through Screens with OFBiz standalone running. i am
>>>>>>>>
>>>>>>> thinking
>>>>>
>>>>>> of a studio plugin but will discuss it another time.
>>>>>>>>
>>>>>>>> I haven't looked at Birt but i guess it can be embedded into an
>>>>>>>>
>>>>>>> existing
>>>>>
>>>>>> web application. Some apps like CAS SSO doesn't allow embedding
>>>>>>>>
>>>>>>> out
>>>
>>>> of the
>>>>>
>>>>>> box and has to be run as a standard web application.
>>>>>>>>
>>>>>>>> When using OFBiz WAR, any standard web applications dependency
>>>>>>>>
>>>>>>> can be
>>>
>>>> deployed alongside. So should be no problem to support the
>>>>>>>>
>>>>>>> loading of
>>>
>>>> standard web application in the plugins in OFBiz standalone.
>>>>>>>>
>>>>>>>> There should also be no impact if we add Tomcat SSO now. When
>>>>>>>>
>>>>>>> deployed as
>>>>>
>>>>>> OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements
>>>>>>>>
>>>>>>> will
>>>
>>>> be
>>>>>
>>>>>> specific to the J2EE container or via another standard web
>>>>>>>>
>>>>>>> application like
>>>>>
>>>>>> CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve
>>>>>>>>
>>>>>>> the
>>>
>>>> problems listed in https://issues.apache.org/
>>>>>>>>
>>>>>>> jira/browse/OFBIZ-6963
>>>
>>>> Regards,
>>>>>>>> James Yong
>>>>>>>>
>>>>>>>> On 2017-05-06 09:37 (+0800), Taher Alkhateeb <
>>>>>>>>
>>>>>>> [hidden email]>
>>>>>
>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hmmm, I'm not sure, but on first glance I'm not sure the best
>>>>>>>>>
>>>>>>>> way
>>>
>>>> to
>>>>>
>>>>>> integrate is by dropping in a war file? Maybe a more robust
>>>>>>>>>
>>>>>>>> solution is
>>>>>
>>>>>> to
>>>>>>>>
>>>>>>>>> have an integration with the engine on the API level and
>>>>>>>>>
>>>>>>>> instantiate it
>>>>>
>>>>>> from within OFBiz within its own control servlet. For example,
>>>>>>>>>
>>>>>>>> take a
>>>>>
>>>>>> look
>>>>>>>>
>>>>>>>>> at how BIRT is deployed.
>>>>>>>>>
>>>>>>>>> So yeah my proposal is more work, but a cleaner integration
>>>>>>>>>
>>>>>>>> solution
>>>>>
>>>>>> IMHO.
>>>>>>>>
>>>>>>>>> On Fri, May 5, 2017 at 8:06 PM, James Yong <
>>>>>>>>>
>>>>>>>> [hidden email]>
>>>
>>>> wrote:
>>>>>
>>>>>> Hi Taher,
>>>>>>>>>>
>>>>>>>>>> I am trying to develop an OFBiz plugin that consists of
>>>>>>>>>> a) Camunda workflow engine (published as a WAR); and
>>>>>>>>>> b) OFBiz web app that make use of the workflow engine.
>>>>>>>>>>
>>>>>>>>>> Allowing OFBiz to load standard web applications will allow
>>>>>>>>>>
>>>>>>>>> me to
>>>
>>>> achieve
>>>>>>>>
>>>>>>>>> the above setup using only 1 plugin, making things easy for
>>>>>>>>>>
>>>>>>>>> end-users.
>>>>>
>>>>>> They
>>>>>>>>
>>>>>>>>> only need to download that plugin, and not worry about
>>>>>>>>>>
>>>>>>>>> deploying
>>>
>>>> the
>>>>>
>>>>>> Camunda workflow engine (published as a WAR) on his/her own,
>>>>>>>>>>
>>>>>>>>> as
>>>
>>>> the WAR
>>>>>
>>>>>> file can be downloaded automatically via gradle script during
>>>>>>>>>>
>>>>>>>>> OFBiz
>>>>>
>>>>>> starting up.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> James Yong
>>>>>>>>>>
>>>>>>>>>> On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
>>>>>>>>>>
>>>>>>>>> [hidden email]>
>>>>>>>>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> This topic is very much linked to the previous thread that
>>>>>>>>>>>
>>>>>>>>>> you
>>>
>>>> started
>>>>>>>>
>>>>>>>>> earleri "Tomcat SSO" so they might as well be one topic. I
>>>>>>>>>>>
>>>>>>>>>> think I
>>>>>
>>>>>> answered
>>>>>>>>>>
>>>>>>>>>>> most stuff in that thread.
>>>>>>>>>>>
>>>>>>>>>>> However, I would add that in my opinion, maybe it would be
>>>>>>>>>>>
>>>>>>>>>> simpler
>>>>>
>>>>>> if we
>>>>>>>>
>>>>>>>>> avoid implementing it in this fashion (ofbiz webapp +
>>>>>>>>>>>
>>>>>>>>>> standard
>>>
>>>> webapp)
>>>>>>>>
>>>>>>>>> but
>>>>>>>>>>
>>>>>>>>>>> instead treat all of OFBiz as a single webapp by
>>>>>>>>>>>
>>>>>>>>>> refactoring
>>>
>>>> the
>>>>>
>>>>>> catalina
>>>>>>>>
>>>>>>>>> container. Having two ways of doing the same thing is
>>>>>>>>>>>
>>>>>>>>>> perhaps
>>>
>>>> an
>>>>>
>>>>>> added
>>>>>>>>
>>>>>>>>> complexity and more cognitive load on people for no added
>>>>>>>>>>>
>>>>>>>>>> value that
>>>>>
>>>>>> I
>>>>>>>>
>>>>>>>>> can
>>>>>>>>>>
>>>>>>>>>>> think of. Unifying, on the other hand, would be a huge
>>>>>>>>>>>
>>>>>>>>>> added
>>>
>>>> value
>>>>>
>>>>>> IMO.
>>>>>>>>
>>>>>>>>> My 2 cents .. and thank you for bringing up this discussion
>>>>>>>>>>>
>>>>>>>>>>> On Fri, May 5, 2017 at 11:35 AM, James Yong <
>>>>>>>>>>>
>>>>>>>>>> [hidden email]>
>>>>>
>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi all,
>>>>>>>>>>>>
>>>>>>>>>>>> I am looking into allowing OFBiz to load standard web
>>>>>>>>>>>>
>>>>>>>>>>> application
>>>>>
>>>>>> where
>>>>>>>>
>>>>>>>>> there is no controller.xml and the jar files residing in
>>>>>>>>>>>>
>>>>>>>>>>> web-inf/lib
>>>>>>>>
>>>>>>>>> folder.
>>>>>>>>>>
>>>>>>>>>>> Proposing to add an attribute named 'type' to the
>>>>>>>>>>>>
>>>>>>>>>>> 'webapp'
>>>
>>>> tag at
>>>>>
>>>>>> ofbiz-component.xml, i.e.
>>>>>>>>>>>>
>>>>>>>>>>>> <webapp name="myapp"
>>>>>>>>>>>>          type="standard"  <--------------- new proposed
>>>>>>>>>>>>
>>>>>>>>>>> attribute
>>>>>
>>>>>>          title="Myapp"
>>>>>>>>>>>>          server="myapp-server"
>>>>>>>>>>>>          location="webapp/myapp"
>>>>>>>>>>>>          mount-point="/myapp"/>
>>>>>>>>>>>>
>>>>>>>>>>>> This new attribute will help to differentiate standard
>>>>>>>>>>>>
>>>>>>>>>>> web
>>>
>>>> applications
>>>>>>>>
>>>>>>>>> from those in OFBiz, and allows Catalina Container to
>>>>>>>>>>>>
>>>>>>>>>>> load
>>>
>>>> them
>>>>>
>>>>>> accordingly.
>>>>>>>>>>
>>>>>>>>>>> When type="standard", will load as standard web
>>>>>>>>>>>>
>>>>>>>>>>> application.
>>>
>>>> When type is empty, load according to OFBiz way.
>>>>>>>>>>>>
>>>>>>>>>>>> Any feedback is welcome.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> James Yong
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

Michael Brohl-3
In reply to this post by Jacques Le Roux
James had the same idea when he added the reference to this thread tothe
Jira description ;-)

Regards,

Michael

Am 07.05.17 um 17:27 schrieb Jacques Le Roux:

> I agree with Michael,
>
> Should we not rather exchange in the Jira or at least put a reference
> to this thread for easier future recall of history?
>
> Thanks
>
> Jacques
>
>
> Le 07/05/2017 à 16:14, Michael Brohl a écrit :
>> Hi James, hi Taher,
>>
>> in general, I think it's helpful to have the possibility to load
>> applications the "Tomcat way". If you want to extend functionality by
>> dropping a third party WAR without setting up another Servlet
>> container it would be possible with this change. The patch seems to
>> be lightweight and if there are no unwanted side effects, why not add
>> it?
>>
>> It's much easier to do it this way instead of making OFBiz ready to
>> be deployed in any servlet container (I guess).
>>
>> Best regards,
>>
>> Michael
>>
>>
>> Am 07.05.17 um 09:23 schrieb Taher Alkhateeb:
>>> Hi James,
>>>
>>> Is it correct to assume that the purpose of this solution is to
>>> allow you
>>> to login to OFBiz and other systems using a unified account? If the
>>> answer
>>> is yes, then doesn't it seem a little strange to have that service
>>> embedded
>>> inside OFBiz when it is serving other accounts of other systems?
>>>
>>> Sorry for the many questions :) just trying to wrap my ahead around
>>> your
>>> vision on this.
>>>
>>> Cheers,
>>>
>>> Taher
>>>
>>> On Sun, May 7, 2017 at 9:44 AM, James Yong <[hidden email]>
>>> wrote:
>>>
>>>> Hi Taher,
>>>>
>>>> Thanks for the review.
>>>>
>>>> My use case is to run CAS SSO on OFBiz, to avoid another Tomcat
>>>> instance.
>>>> But I won't commit the patch if others doesn't need it.
>>>>
>>>> Regards,
>>>> James Yong
>>>>
>>>> PS: I can run standard web application in earlier OFBiz versions.
>>>>
>>>> On 2017-05-07 14:09 (+0800), Taher Alkhateeb
>>>> <[hidden email]>
>>>> wrote:
>>>>> Hi James,
>>>>>
>>>>> I saw the patch and it seems to be in proper order.
>>>>>
>>>>> However, the issue still remains of why and what. Your patch is
>>>> essentially
>>>>> turning OFBiz into a partial web server by calling the "addWebapp()"
>>>>> method. You want to do that so you can put an external web
>>>>> application
>>>>> inside the code base to run side-by-side with OFBiz.
>>>>>
>>>>> What I understand from this is that you want to have two webapps
>>>>> running
>>>>> together, and then communicating with each other over the wire. In
>>>>> other
>>>>> words, we have almost no integration between the two applications.
>>>>>
>>>>> So I will try to ask this question in reverse: Why do you want to
>>>>> run a
>>>>> standard Tomcat webapp inside OFBiz? What do you want to "share"? And
>>>> also,
>>>>> what is forcing to take the route of an independent webapp as
>>>>> opposed to
>>>> an
>>>>> integration solution on the API level?
>>>>>
>>>>> On Sat, May 6, 2017 at 7:17 PM, James Yong <[hidden email]>
>>>>> wrote:
>>>>>
>>>>>> Created a JIRA issue and upload a patch at
>>>>>> https://issues.apache.org/jira/browse/OFBIZ-9347
>>>>>>
>>>>>> On 2017-05-06 19:27 (+0800), "James Yong"<[hidden email]>
>>>>>> wrote:
>>>>>>> Thanks Taher.
>>>>>>>
>>>>>>> Those are the big pictures. For now, need to work on the smaller
>>>> issues.
>>>>>>> So I will start with the patch for the loading of standard web
>>>>>> application.
>>>>>>> Regards,
>>>>>>> James Yong
>>>>>>>
>>>>>>> On 2017-05-06 18:48 (+0800), Taher Alkhateeb <
>>>> [hidden email]>
>>>>>> wrote:
>>>>>>>> Hi James,
>>>>>>>>
>>>>>>>> I guess we can start discussing this at a more detailed level once
>>>> you
>>>>>> have
>>>>>>>> a PoC or more elaborate exploration of the exact "why" and "how".
>>>> All
>>>>>> good
>>>>>>>> initiatives !
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>>
>>>>>>>> Taher Alkhateeb
>>>>>>>>
>>>>>>>> On Sat, May 6, 2017 at 7:41 AM, James Yong <[hidden email]>
>>>>>> wrote:
>>>>>>>>> Hi Taher,
>>>>>>>>>
>>>>>>>>> Thank you also for the thoughts shared in the 'Loading standard
>>>> web
>>>>>>>>> application' and opening the discussion.
>>>>>>>>>
>>>>>>>>> Instead of converting OFBiz fully into a single web application,
>>>> i
>>>>>> suggest
>>>>>>>>> we can have build functions:
>>>>>>>>> 1. to compile OFBiz into a WAR. This build-WAR function is
>>>> optional
>>>>>> and
>>>>>>>>> used only when the developer needs to deploy OFBiz WAR in a
>>>> separate
>>>>>>>>> Servlet Container. Only the necessary files will be added to the
>>>> WAR
>>>>>> file.
>>>>>>>>> 2. For deployment to different SIT / UAT / Production
>>>> environment.
>>>>>>>>> 3. Accessed through Screens with OFBiz standalone running. i am
>>>>>> thinking
>>>>>>>>> of a studio plugin but will discuss it another time.
>>>>>>>>>
>>>>>>>>> I haven't looked at Birt but i guess it can be embedded into an
>>>>>> existing
>>>>>>>>> web application. Some apps like CAS SSO doesn't allow embedding
>>>> out
>>>>>> of the
>>>>>>>>> box and has to be run as a standard web application.
>>>>>>>>>
>>>>>>>>> When using OFBiz WAR, any standard web applications dependency
>>>> can be
>>>>>>>>> deployed alongside. So should be no problem to support the
>>>> loading of
>>>>>>>>> standard web application in the plugins in OFBiz standalone.
>>>>>>>>>
>>>>>>>>> There should also be no impact if we add Tomcat SSO now. When
>>>>>> deployed as
>>>>>>>>> OFBiz WAR, Tomcat SSO will be irrelevant. Any SSO requirements
>>>> will
>>>>>> be
>>>>>>>>> specific to the J2EE container or via another standard web
>>>>>> application like
>>>>>>>>> CAS SSO. But adding Tomcat SSO to OFBiz standalone, we can solve
>>>> the
>>>>>>>>> problems listed in https://issues.apache.org/
>>>> jira/browse/OFBIZ-6963
>>>>>>>>> Regards,
>>>>>>>>> James Yong
>>>>>>>>>
>>>>>>>>> On 2017-05-06 09:37 (+0800), Taher Alkhateeb <
>>>>>> [hidden email]>
>>>>>>>>> wrote:
>>>>>>>>>> Hmmm, I'm not sure, but on first glance I'm not sure the best
>>>> way
>>>>>> to
>>>>>>>>>> integrate is by dropping in a war file? Maybe a more robust
>>>>>> solution is
>>>>>>>>> to
>>>>>>>>>> have an integration with the engine on the API level and
>>>>>> instantiate it
>>>>>>>>>> from within OFBiz within its own control servlet. For example,
>>>>>> take a
>>>>>>>>> look
>>>>>>>>>> at how BIRT is deployed.
>>>>>>>>>>
>>>>>>>>>> So yeah my proposal is more work, but a cleaner integration
>>>>>> solution
>>>>>>>>> IMHO.
>>>>>>>>>> On Fri, May 5, 2017 at 8:06 PM, James Yong <
>>>> [hidden email]>
>>>>>> wrote:
>>>>>>>>>>> Hi Taher,
>>>>>>>>>>>
>>>>>>>>>>> I am trying to develop an OFBiz plugin that consists of
>>>>>>>>>>> a) Camunda workflow engine (published as a WAR); and
>>>>>>>>>>> b) OFBiz web app that make use of the workflow engine.
>>>>>>>>>>>
>>>>>>>>>>> Allowing OFBiz to load standard web applications will allow
>>>> me to
>>>>>>>>> achieve
>>>>>>>>>>> the above setup using only 1 plugin, making things easy for
>>>>>> end-users.
>>>>>>>>> They
>>>>>>>>>>> only need to download that plugin, and not worry about
>>>> deploying
>>>>>> the
>>>>>>>>>>> Camunda workflow engine (published as a WAR) on his/her own,
>>>> as
>>>>>> the WAR
>>>>>>>>>>> file can be downloaded automatically via gradle script during
>>>>>> OFBiz
>>>>>>>>>>> starting up.
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> James Yong
>>>>>>>>>>>
>>>>>>>>>>> On 2017-05-05 18:07 (+0800), Taher Alkhateeb <
>>>>>>>>> [hidden email]>
>>>>>>>>>>> wrote:
>>>>>>>>>>>> This topic is very much linked to the previous thread that
>>>> you
>>>>>>>>> started
>>>>>>>>>>>> earleri "Tomcat SSO" so they might as well be one topic. I
>>>>>> think I
>>>>>>>>>>> answered
>>>>>>>>>>>> most stuff in that thread.
>>>>>>>>>>>>
>>>>>>>>>>>> However, I would add that in my opinion, maybe it would be
>>>>>> simpler
>>>>>>>>> if we
>>>>>>>>>>>> avoid implementing it in this fashion (ofbiz webapp +
>>>> standard
>>>>>>>>> webapp)
>>>>>>>>>>> but
>>>>>>>>>>>> instead treat all of OFBiz as a single webapp by
>>>> refactoring
>>>>>> the
>>>>>>>>> catalina
>>>>>>>>>>>> container. Having two ways of doing the same thing is
>>>> perhaps
>>>>>> an
>>>>>>>>> added
>>>>>>>>>>>> complexity and more cognitive load on people for no added
>>>>>> value that
>>>>>>>>> I
>>>>>>>>>>> can
>>>>>>>>>>>> think of. Unifying, on the other hand, would be a huge
>>>> added
>>>>>> value
>>>>>>>>> IMO.
>>>>>>>>>>>> My 2 cents .. and thank you for bringing up this discussion
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, May 5, 2017 at 11:35 AM, James Yong <
>>>>>> [hidden email]>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>> Hi all,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am looking into allowing OFBiz to load standard web
>>>>>> application
>>>>>>>>> where
>>>>>>>>>>>>> there is no controller.xml and the jar files residing in
>>>>>>>>> web-inf/lib
>>>>>>>>>>> folder.
>>>>>>>>>>>>> Proposing to add an attribute named 'type' to the
>>>> 'webapp'
>>>>>> tag at
>>>>>>>>>>>>> ofbiz-component.xml, i.e.
>>>>>>>>>>>>>
>>>>>>>>>>>>> <webapp name="myapp"
>>>>>>>>>>>>>          type="standard" <--------------- new proposed
>>>>>> attribute
>>>>>>>>>>>>> title="Myapp"
>>>>>>>>>>>>>          server="myapp-server"
>>>>>>>>>>>>>          location="webapp/myapp"
>>>>>>>>>>>>>          mount-point="/myapp"/>
>>>>>>>>>>>>>
>>>>>>>>>>>>> This new attribute will help to differentiate standard
>>>> web
>>>>>>>>> applications
>>>>>>>>>>>>> from those in OFBiz, and allows Catalina Container to
>>>> load
>>>>>> them
>>>>>>>>>>> accordingly.
>>>>>>>>>>>>> When type="standard", will load as standard web
>>>> application.
>>>>>>>>>>>>> When type is empty, load according to OFBiz way.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Any feedback is welcome.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>> James Yong
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>
>>
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

James Yong-2
In reply to this post by taher
Hi Taher,

Hope to address your concerns.
My replies are inlined below.
Thanks.

Regards,
James

On 2017-05-08 01:22 (+0800), Taher Alkhateeb <[hidden email]> wrote:
> Hey Michael, James, all
>
> First of all, I gotta say James' efforts are awesome, keep them coming :)
>
> The reason I am expressing concerns is the following:
>
> - Having OFBiz act sort of like a web server might be architecturally
> straining on resources (think micro-services, this is sort of the opposite)

OFBiz web application is architecturally similar to standard web app. The developer can have additional choice of deploying external standard web applications within plugins on OFBiz, in any of the SIT/UAT/Production environment, if it is helpful to them.

> - If we adopt a multi webapp architecture now, it might be hard to change
> in the future if we decide to go with a lean architecture that loads
> everything into one webapp which you can just deploy as a single jar on any
> servlet container.

One viable approach is to have a build function for creating OFBiz WAR.
During the build process:
1) We will need to copy the necessary files over from OFBiz Standalone to OFBiz WAR, with the required jar files copied over WEB-INF/lib in OFBiz WAR etc; and
2) Any standard web applications within OFBiz will be zipped up as separate WARs. This should be much easier than (1).
Users can run either OFBiz WAR (along with other WARs mentioned at (2)) or OFBiz standalone in their environments.
What do you think of the above approach?

> - If you look at the whole architecture of OFBiz, the way we launch new
> processes is usually by firing up a Container (a background process or
> server if you like). What we are doing here instead is starting a webapp
> inside of an existing tomcat instance fired up by OFBiz. This might lock us
> to tomcat only because we can no longer reverse the launch sequence (web
> server starting OFBiz instead of the other way around).

Are you planning to remove all dependencies on Catalina Container from OFBiz standalone?
Else I don't see an issue here. Standard web applications, even if not loaded by Tomcat, can still be loaded by other Servlet Container.

> - Finally, integration as far as I understand it happens in multiple ways,
> but I'm not familiar with this one. For example, you can integrate by:
>   - Having some kind of engine, and firing it up from your application
> using special API (provided by you or the engine vendor like in BIRT)
>   - Having two separate systems talking to each other over the network
> using REST or something like that.

Able to integrate via JAVA API would be best, imo.

>
> So although the work being done is kind of cool, I worry it might lock us
> down in the future. But hey, if people feel good about it, then it might be
> worth introducing.
>
> Either way, again thank you for all the work James! :)

Thank you.

>
> Cheers,
>
> Taher Alkhateeb
>

>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

Jacopo Cappellato-5
In reply to this post by James Yong-2
Hi James,

thanks for your design proposal and implementation: I have reviewed your
patch in Jira and it looks good to me.
As mentioned by Taher, in the future we may try to move away from the OFBiz
container driven startup process in order to make OFBiz more easily
deployable in an application server; deploying application like you have
described will be even easier if we will succeed.
In the meantime, since it will take time and your approach is simple and
effective, I think that we could commit your work.

Regards,

Jacopo

On Fri, May 5, 2017 at 10:35 AM, James Yong <[hidden email]> wrote:

> Hi all,
>
> I am looking into allowing OFBiz to load standard web application where
> there is no controller.xml and the jar files residing in web-inf/lib folder.
>
> Proposing to add an attribute named 'type' to the 'webapp' tag at
> ofbiz-component.xml, i.e.
>
> <webapp name="myapp"
>         type="standard"  <--------------- new proposed attribute
>         title="Myapp"
>         server="myapp-server"
>         location="webapp/myapp"
>         mount-point="/myapp"/>
>
> This new attribute will help to differentiate standard web applications
> from those in OFBiz, and allows Catalina Container to load them accordingly.
> When type="standard", will load as standard web application.
> When type is empty, load according to OFBiz way.
>
> Any feedback is welcome.
>
> Regards,
> James Yong
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

James Yong-2
Hi Jacopo,

Thank you for looking into the matter.

Was just looking at loading standard web application due to one use-case,
but the issue of deploying OFBiz WAR was bought up.

Just to reiterate that allowing standard web application now should not impede efforts towards building OFBiz WAR later, unless there are plans to remove CatalinaContainer entirely. Thank you.

Kind Regards,
James

On 2017-05-08 22:17 (+0800), Jacopo Cappellato <[hidden email]> wrote:

> Hi James,
>
> thanks for your design proposal and implementation: I have reviewed your
> patch in Jira and it looks good to me.
> As mentioned by Taher, in the future we may try to move away from the OFBiz
> container driven startup process in order to make OFBiz more easily
> deployable in an application server; deploying application like you have
> described will be even easier if we will succeed.
> In the meantime, since it will take time and your approach is simple and
> effective, I think that we could commit your work.
>
> Regards,
>
> Jacopo
>
> On Fri, May 5, 2017 at 10:35 AM, James Yong <[hidden email]> wrote:
>
> > Hi all,
> >
> > I am looking into allowing OFBiz to load standard web application where
> > there is no controller.xml and the jar files residing in web-inf/lib folder.
> >
> > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > ofbiz-component.xml, i.e.
> >
> > <webapp name="myapp"
> >         type="standard"  <--------------- new proposed attribute
> >         title="Myapp"
> >         server="myapp-server"
> >         location="webapp/myapp"
> >         mount-point="/myapp"/>
> >
> > This new attribute will help to differentiate standard web applications
> > from those in OFBiz, and allows Catalina Container to load them accordingly.
> > When type="standard", will load as standard web application.
> > When type is empty, load according to OFBiz way.
> >
> > Any feedback is welcome.
> >
> > Regards,
> > James Yong
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loading standard web application

taher
Jacopo summarized this very nicely.

So yeah I would say the code quality of code in this feature is good and
can go to the code base, but let's stay open to the idea of refactoring
which may affect it in the future. I am already doing some low level work
in that area BTW

Cheers,

Taher Alkhateeb

On May 8, 2017 6:13 PM, "James Yong" <[hidden email]> wrote:

> Hi Jacopo,
>
> Thank you for looking into the matter.
>
> Was just looking at loading standard web application due to one use-case,
> but the issue of deploying OFBiz WAR was bought up.
>
> Just to reiterate that allowing standard web application now should not
> impede efforts towards building OFBiz WAR later, unless there are plans to
> remove CatalinaContainer entirely. Thank you.
>
> Kind Regards,
> James
>
> On 2017-05-08 22:17 (+0800), Jacopo Cappellato <jacopo.cappellato@
> hotwaxsystems.com> wrote:
> > Hi James,
> >
> > thanks for your design proposal and implementation: I have reviewed your
> > patch in Jira and it looks good to me.
> > As mentioned by Taher, in the future we may try to move away from the
> OFBiz
> > container driven startup process in order to make OFBiz more easily
> > deployable in an application server; deploying application like you have
> > described will be even easier if we will succeed.
> > In the meantime, since it will take time and your approach is simple and
> > effective, I think that we could commit your work.
> >
> > Regards,
> >
> > Jacopo
> >
> > On Fri, May 5, 2017 at 10:35 AM, James Yong <[hidden email]>
> wrote:
> >
> > > Hi all,
> > >
> > > I am looking into allowing OFBiz to load standard web application where
> > > there is no controller.xml and the jar files residing in web-inf/lib
> folder.
> > >
> > > Proposing to add an attribute named 'type' to the 'webapp' tag at
> > > ofbiz-component.xml, i.e.
> > >
> > > <webapp name="myapp"
> > >         type="standard"  <--------------- new proposed attribute
> > >         title="Myapp"
> > >         server="myapp-server"
> > >         location="webapp/myapp"
> > >         mount-point="/myapp"/>
> > >
> > > This new attribute will help to differentiate standard web applications
> > > from those in OFBiz, and allows Catalina Container to load them
> accordingly.
> > > When type="standard", will load as standard web application.
> > > When type is empty, load according to OFBiz way.
> > >
> > > Any feedback is welcome.
> > >
> > > Regards,
> > > James Yong
> > >
> > >
> >
>
12