You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Dain Sundstrom <da...@iq80.com> on 2008/01/03 21:29:57 UTC

Jetty detection

I added code to switch from the OpenEJB http server to Jetty when the  
Jetty classes are available.  You can also explicitly state which  
http server impl will be chosen by setting the 'impl' property in the  
HttpEjbServer properties.

Let me know if you have any problems.  Also, David if you have time  
can you review my changes?  I'm not sure it is how you wanted this to  
work (I just hacked something quickly).

-dain

Re: Jetty detection

Posted by Mohammad Nour El-Din <no...@gmail.com>.
When I run svn co these warning messages are displayed

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_US.UTF-8
svn: warning: please check that your locale name is correct

is it related to the problem ???

see problem here -->
http://www.mail-archive.com/dev@openejb.apache.org/msg01605.html


On Jan 8, 2008 10:47 PM, Mohammad Nour El-Din <no...@gmail.com>
wrote:

> Yes :D not in the coding but the encoding problems, it does not allow me
> to compile the code :S, can u help in that ?
>
>
> On Jan 8, 2008 10:44 PM, Dain Sundstrom < dain@iq80.com> wrote:
>
> > Good idea.  If you need any help, just let me know.
> >
> > -dain
> >
> > On Jan 5, 2008, at 6:23 PM, Mohammad Nour El-Din wrote:
> >
> > > I looked at code committed and I have another idea to add, in case
> > > we are
> > > going to use the Jett implementation we can detect whether there is a
> > > jetty.xml - jetty configuration - file under our config directory -
> > > or we
> > > can define the path by a property - to configure the jetty server,
> > > in case
> > > we didn't find the jetty.xml we can have a default configuration
> > > object to
> > > use, or even better we can set a default configuration file and
> > > users can
> > > edit it on demand. I will study the code and start to do it.
> > >
> > > On Jan 6, 2008 4:00 AM, Mohammad Nour El-Din <no...@gmail.com>
> > > wrote:
> > >
> > >> Well Dain read my mind  regarding the configuration property but
> > >> the new
> > >> thing is detecting the Jetty classes. I can play with the new code
> > >> and see
> > >> how it runs.
> > >>
> > >>
> > >> On Jan 5, 2008 12:50 PM, David Blevins < david.blevins@visi.com>
> > >> wrote:
> > >>
> > >>>
> > >>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
> > >>>
> > >>>> I added code to switch from the OpenEJB http server to Jetty when
> > >>>> the Jetty classes are available.  You can also explicitly state
> > >>>> which http server impl will be chosen by setting the 'impl'
> > >>>> property
> > >>>> in the HttpEjbServer properties.
> > >>>>
> > >>>> Let me know if you have any problems.  Also, David if you have time
> > >>>> can you review my changes?  I'm not sure it is how you wanted this
> > >>>> to work (I just hacked something quickly).
> > >>>
> > >>> Cool.  Mohammad had mentioned he was going to work on this[1].
> > >>> Mohammad how does this compare to what you were thinking of doing?
> > >>>
> > >>> -David
> > >>>
> > >>> [1]
> > >>> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-
> > >>> OpenEJB-p14478246.html
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> Thanks
> > >> - Mohammad Nour
> > >
> > >
> > >
> > >
> > > --
> > > Thanks
> > > - Mohammad Nour
> >
> >
>
>
> --
> Thanks
> - Mohammad Nour




-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by Alexander Saint Croix <sa...@gmail.com>.
IntelliJ FTW.

On Jan 11, 2008 7:34 AM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:

> On Jan 11, 2008 2:32 PM, Daniel S. Haischt
> <da...@googlemail.com> wrote:
> > Emacs and vim (at least mine) did report that there is an issue with
> > the file as well but you were allowed to edit the file at least. It's
> > only Eclipse that seems to think that the user is stupid and thus it's
> > required to take extra care ;)
>
> Another valid point to switch to idea ;-)
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>

Re: Jetty detection

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Jan 11, 2008 2:32 PM, Daniel S. Haischt
<da...@googlemail.com> wrote:
> Emacs and vim (at least mine) did report that there is an issue with
> the file as well but you were allowed to edit the file at least. It's
> only Eclipse that seems to think that the user is stupid and thus it's
> required to take extra care ;)

Another valid point to switch to idea ;-)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: Jetty detection

Posted by "Daniel S. Haischt" <da...@googlemail.com>.
Emacs and vim (at least mine) did report that there is an issue with
the file as well but you were allowed to edit the file at least. It's
only Eclipse that seems to think that the user is stupid and thus it's
required to take extra care ;)

Jacek Laskowski wrote:
> 
> If I had only known it! Before Dave changed it I had the some changes
> for it to commit at that time when the issue was reported, but didn't
> consider them as the fixes. Dave eventually beat me to it. IDEA
> reported them as errors so they were easily to spot.
> 
> Jacek
> 


Re: Jetty detection

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Jan 11, 2008 12:36 PM, Daniel S. Haischt
<da...@googlemail.com> wrote:

> Some of the Java source files got special characters in their JavaDoc
> comments. IIRC it was a semicolon. This forced Eclipse on insisting
> that the file must be UTF-8 encoded and thus Eclipse refused to open
> the file if not explicitly setting the encoding to UTF-8.
>
> Other editors and IDEs did not have such a stupid behavior...

If I had only known it! Before Dave changed it I had the some changes
for it to commit at that time when the issue was reported, but didn't
consider them as the fixes. Dave eventually beat me to it. IDEA
reported them as errors so they were easily to spot.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: Jetty detection

Posted by "Daniel S. Haischt" <da...@googlemail.com>.
Jacek Laskowski wrote:
> On Jan 11, 2008 2:05 AM, Mohammad Nour El-Din <no...@gmail.com> wrote:
>> The encoding problem solved. I will start to work on the embedded Jetty
>> thing.
> 
> What was changed? What caused the issue surface?
> 

Some of the Java source files got special characters in their JavaDoc
comments. IIRC it was a semicolon. This forced Eclipse on insisting
that the file must be UTF-8 encoded and thus Eclipse refused to open
the file if not explicitly setting the encoding to UTF-8.

Other editors and IDEs did not have such a stupid behavior...

Cheers
Daniel

Re: Jetty detection

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Jan 11, 2008 2:05 AM, Mohammad Nour El-Din <no...@gmail.com> wrote:
> The encoding problem solved. I will start to work on the embedded Jetty
> thing.

What was changed? What caused the issue surface?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: Jetty detection

Posted by Mohammad Nour El-Din <no...@gmail.com>.
The encoding problem solved. I will start to work on the embedded Jetty
thing.

On Jan 8, 2008 11:04 PM, David Blevins <da...@visi.com> wrote:

>
> On Jan 8, 2008, at 12:47 PM, Mohammad Nour El-Din wrote:
>
> > Yes :D not in the coding but the encoding problems, it does not
> > allow me to
> > compile the code :S, can u help in that ?
>
> Can you give this a try:
> http://www.nabble.com/Re%3A-Source-code-files-character-encoding-problems-p14640284.html
>
> -David
>
> > On Jan 8, 2008 10:44 PM, Dain Sundstrom <da...@iq80.com> wrote:
> >
> >> Good idea.  If you need any help, just let me know.
> >>
> >> -dain
> >>
> >> On Jan 5, 2008, at 6:23 PM, Mohammad Nour El-Din wrote:
> >>
> >>> I looked at code committed and I have another idea to add, in case
> >>> we are
> >>> going to use the Jett implementation we can detect whether there
> >>> is a
> >>> jetty.xml - jetty configuration - file under our config directory -
> >>> or we
> >>> can define the path by a property - to configure the jetty server,
> >>> in case
> >>> we didn't find the jetty.xml we can have a default configuration
> >>> object to
> >>> use, or even better we can set a default configuration file and
> >>> users can
> >>> edit it on demand. I will study the code and start to do it.
> >>>
> >>> On Jan 6, 2008 4:00 AM, Mohammad Nour El-Din <nour.mohammad@gmail.com
> >>> >
> >>> wrote:
> >>>
> >>>> Well Dain read my mind  regarding the configuration property but
> >>>> the new
> >>>> thing is detecting the Jetty classes. I can play with the new code
> >>>> and see
> >>>> how it runs.
> >>>>
> >>>>
> >>>> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com>
> >>>> wrote:
> >>>>
> >>>>>
> >>>>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
> >>>>>
> >>>>>> I added code to switch from the OpenEJB http server to Jetty when
> >>>>>> the Jetty classes are available.  You can also explicitly state
> >>>>>> which http server impl will be chosen by setting the 'impl'
> >>>>>> property
> >>>>>> in the HttpEjbServer properties.
> >>>>>>
> >>>>>> Let me know if you have any problems.  Also, David if you have
> >>>>>> time
> >>>>>> can you review my changes?  I'm not sure it is how you wanted
> >>>>>> this
> >>>>>> to work (I just hacked something quickly).
> >>>>>
> >>>>> Cool.  Mohammad had mentioned he was going to work on this[1].
> >>>>> Mohammad how does this compare to what you were thinking of doing?
> >>>>>
> >>>>> -David
> >>>>>
> >>>>> [1]
> >>>>> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-
> >>>>> OpenEJB-p14478246.html
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Thanks
> >>>> - Mohammad Nour
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Thanks
> >>> - Mohammad Nour
> >>
> >>
> >
> >
> > --
> > Thanks
> > - Mohammad Nour
>
>


-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by David Blevins <da...@visi.com>.
On Jan 8, 2008, at 12:47 PM, Mohammad Nour El-Din wrote:

> Yes :D not in the coding but the encoding problems, it does not  
> allow me to
> compile the code :S, can u help in that ?

Can you give this a try: http://www.nabble.com/Re%3A-Source-code-files-character-encoding-problems-p14640284.html

-David

> On Jan 8, 2008 10:44 PM, Dain Sundstrom <da...@iq80.com> wrote:
>
>> Good idea.  If you need any help, just let me know.
>>
>> -dain
>>
>> On Jan 5, 2008, at 6:23 PM, Mohammad Nour El-Din wrote:
>>
>>> I looked at code committed and I have another idea to add, in case
>>> we are
>>> going to use the Jett implementation we can detect whether there  
>>> is a
>>> jetty.xml - jetty configuration - file under our config directory -
>>> or we
>>> can define the path by a property - to configure the jetty server,
>>> in case
>>> we didn't find the jetty.xml we can have a default configuration
>>> object to
>>> use, or even better we can set a default configuration file and
>>> users can
>>> edit it on demand. I will study the code and start to do it.
>>>
>>> On Jan 6, 2008 4:00 AM, Mohammad Nour El-Din <nour.mohammad@gmail.com 
>>> >
>>> wrote:
>>>
>>>> Well Dain read my mind  regarding the configuration property but
>>>> the new
>>>> thing is detecting the Jetty classes. I can play with the new code
>>>> and see
>>>> how it runs.
>>>>
>>>>
>>>> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com>
>>>> wrote:
>>>>
>>>>>
>>>>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
>>>>>
>>>>>> I added code to switch from the OpenEJB http server to Jetty when
>>>>>> the Jetty classes are available.  You can also explicitly state
>>>>>> which http server impl will be chosen by setting the 'impl'
>>>>>> property
>>>>>> in the HttpEjbServer properties.
>>>>>>
>>>>>> Let me know if you have any problems.  Also, David if you have  
>>>>>> time
>>>>>> can you review my changes?  I'm not sure it is how you wanted  
>>>>>> this
>>>>>> to work (I just hacked something quickly).
>>>>>
>>>>> Cool.  Mohammad had mentioned he was going to work on this[1].
>>>>> Mohammad how does this compare to what you were thinking of doing?
>>>>>
>>>>> -David
>>>>>
>>>>> [1]
>>>>> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-
>>>>> OpenEJB-p14478246.html
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks
>>>> - Mohammad Nour
>>>
>>>
>>>
>>>
>>> --
>>> Thanks
>>> - Mohammad Nour
>>
>>
>
>
> -- 
> Thanks
> - Mohammad Nour


Re: Jetty detection

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Yes :D not in the coding but the encoding problems, it does not allow me to
compile the code :S, can u help in that ?

On Jan 8, 2008 10:44 PM, Dain Sundstrom <da...@iq80.com> wrote:

> Good idea.  If you need any help, just let me know.
>
> -dain
>
> On Jan 5, 2008, at 6:23 PM, Mohammad Nour El-Din wrote:
>
> > I looked at code committed and I have another idea to add, in case
> > we are
> > going to use the Jett implementation we can detect whether there is a
> > jetty.xml - jetty configuration - file under our config directory -
> > or we
> > can define the path by a property - to configure the jetty server,
> > in case
> > we didn't find the jetty.xml we can have a default configuration
> > object to
> > use, or even better we can set a default configuration file and
> > users can
> > edit it on demand. I will study the code and start to do it.
> >
> > On Jan 6, 2008 4:00 AM, Mohammad Nour El-Din <no...@gmail.com>
> > wrote:
> >
> >> Well Dain read my mind  regarding the configuration property but
> >> the new
> >> thing is detecting the Jetty classes. I can play with the new code
> >> and see
> >> how it runs.
> >>
> >>
> >> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com>
> >> wrote:
> >>
> >>>
> >>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
> >>>
> >>>> I added code to switch from the OpenEJB http server to Jetty when
> >>>> the Jetty classes are available.  You can also explicitly state
> >>>> which http server impl will be chosen by setting the 'impl'
> >>>> property
> >>>> in the HttpEjbServer properties.
> >>>>
> >>>> Let me know if you have any problems.  Also, David if you have time
> >>>> can you review my changes?  I'm not sure it is how you wanted this
> >>>> to work (I just hacked something quickly).
> >>>
> >>> Cool.  Mohammad had mentioned he was going to work on this[1].
> >>> Mohammad how does this compare to what you were thinking of doing?
> >>>
> >>> -David
> >>>
> >>> [1]
> >>> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-
> >>> OpenEJB-p14478246.html
> >>>
> >>>
> >>
> >>
> >> --
> >> Thanks
> >> - Mohammad Nour
> >
> >
> >
> >
> > --
> > Thanks
> > - Mohammad Nour
>
>


-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by Dain Sundstrom <da...@iq80.com>.
Good idea.  If you need any help, just let me know.

-dain

On Jan 5, 2008, at 6:23 PM, Mohammad Nour El-Din wrote:

> I looked at code committed and I have another idea to add, in case  
> we are
> going to use the Jett implementation we can detect whether there is a
> jetty.xml - jetty configuration - file under our config directory -  
> or we
> can define the path by a property - to configure the jetty server,  
> in case
> we didn't find the jetty.xml we can have a default configuration  
> object to
> use, or even better we can set a default configuration file and  
> users can
> edit it on demand. I will study the code and start to do it.
>
> On Jan 6, 2008 4:00 AM, Mohammad Nour El-Din <no...@gmail.com>
> wrote:
>
>> Well Dain read my mind  regarding the configuration property but  
>> the new
>> thing is detecting the Jetty classes. I can play with the new code  
>> and see
>> how it runs.
>>
>>
>> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com>  
>> wrote:
>>
>>>
>>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
>>>
>>>> I added code to switch from the OpenEJB http server to Jetty when
>>>> the Jetty classes are available.  You can also explicitly state
>>>> which http server impl will be chosen by setting the 'impl'  
>>>> property
>>>> in the HttpEjbServer properties.
>>>>
>>>> Let me know if you have any problems.  Also, David if you have time
>>>> can you review my changes?  I'm not sure it is how you wanted this
>>>> to work (I just hacked something quickly).
>>>
>>> Cool.  Mohammad had mentioned he was going to work on this[1].
>>> Mohammad how does this compare to what you were thinking of doing?
>>>
>>> -David
>>>
>>> [1]
>>> http://www.nabble.com/Re%3A-Webservice-support-in-standalone- 
>>> OpenEJB-p14478246.html
>>>
>>>
>>
>>
>> --
>> Thanks
>> - Mohammad Nour
>
>
>
>
> -- 
> Thanks
> - Mohammad Nour


Re: Jetty detection

Posted by Mohammad Nour El-Din <no...@gmail.com>.
I looked at code committed and I have another idea to add, in case we are
going to use the Jett implementation we can detect whether there is a
jetty.xml - jetty configuration - file under our config directory - or we
can define the path by a property - to configure the jetty server, in case
we didn't find the jetty.xml we can have a default configuration object to
use, or even better we can set a default configuration file and users can
edit it on demand. I will study the code and start to do it.

On Jan 6, 2008 4:00 AM, Mohammad Nour El-Din <no...@gmail.com>
wrote:

> Well Dain read my mind  regarding the configuration property but the new
> thing is detecting the Jetty classes. I can play with the new code and see
> how it runs.
>
>
> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com> wrote:
>
> >
> > On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
> >
> > > I added code to switch from the OpenEJB http server to Jetty when
> > > the Jetty classes are available.  You can also explicitly state
> > > which http server impl will be chosen by setting the 'impl' property
> > > in the HttpEjbServer properties.
> > >
> > > Let me know if you have any problems.  Also, David if you have time
> > > can you review my changes?  I'm not sure it is how you wanted this
> > > to work (I just hacked something quickly).
> >
> > Cool.  Mohammad had mentioned he was going to work on this[1].
> > Mohammad how does this compare to what you were thinking of doing?
> >
> > -David
> >
> > [1]
> > http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html
> >
> >
>
>
> --
> Thanks
> - Mohammad Nour




-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Thanks DBlevins :), I am just waiting for some free time to get back
to it again. But if anyone free and like to go into it it is OK.

On Sun, Mar 9, 2008 at 2:47 AM, David Blevins <da...@visi.com> wrote:
>
>  On Feb 18, 2008, at 4:05 PM, David Blevins wrote:
>
>  > You should be able to plumb that right into the
>  > HttpServerFactory.createServerService() method.
>  >
>  > Once that is done we likely don't need the jetty-httpejbd file
>  > anymore.  If someone adds jetty to their openejb install, it should
>  > just detect it and use it without any need for extra configuration.
>
>
>  FYI, I added this to HttpServerFactory.createServerService():
>
>          try {
>              ClassLoader cl =
>  Thread.currentThread().getContextClassLoader();
>              cl.loadClass("org.mortbay.jetty.Connector");
>              return new JettyHttpEjbServer();
>          } catch (Throwable e) {
>              // We don't have jetty
>          }
>
>  So we should be good on the jetty detection thing.
>
>  -David
>
>
>



-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by David Blevins <da...@visi.com>.
On Feb 18, 2008, at 4:05 PM, David Blevins wrote:

> You should be able to plumb that right into the  
> HttpServerFactory.createServerService() method.
>
> Once that is done we likely don't need the jetty-httpejbd file  
> anymore.  If someone adds jetty to their openejb install, it should  
> just detect it and use it without any need for extra configuration.


FYI, I added this to HttpServerFactory.createServerService():

         try {
             ClassLoader cl =  
Thread.currentThread().getContextClassLoader();
             cl.loadClass("org.mortbay.jetty.Connector");
             return new JettyHttpEjbServer();
         } catch (Throwable e) {
             // We don't have jetty
         }

So we should be good on the jetty detection thing.

-David



Re: Jetty detection

Posted by Mohammad Nour El-Din <no...@gmail.com>.
On Feb 20, 2008 3:40 AM, David Blevins <da...@visi.com> wrote:

>
> On Feb 19, 2008, at 1:43 AM, Mohammad Nour El-Din wrote:
>
> > OpenEJB build fails on the vmbuild machine
> >
> > http://marc.info/?l=openejb-cvs&m=120339837024436&w=2
> >
> > And from the surefire reports I think there is a port conflict of the
> > http/jetty service with the http service's port on the vmbuild machine
> >
> >
> http://vmbuild.apache.org/continuum/surefireReport.action?buildId=52637&projectId=358#org.apache.openejb.server.httpd.HttpEjbServerTest
> >
> > I will try to look at it this night unless someone jumps in before
> > me :)
>
> Fixed it.  Looks like the test was hardcoded to use 8080 which is a
> pretty popular port for obvious reasons (continuum itself was using
> that port).  Reverted the test back to using the randomly available
> port strategy.  If you can figure out how to get the random port
> strategy to work with jetty then feel free to add a second test case
> for jetty.

Thanks DBlevins, I will when I use your code to dynamicly detect Jetty
presence .

>
>
> -David
>
> > On Tue, Feb 19, 2008 at 11:21 AM, Mohammad Nour El-Din <mnour@apache.org
> > >
> > wrote:
> >
> >> Gr8, thanks dblevins, I will look at your code to learn what you
> >> did, and
> >> use it to impl the Jetty detection.
> >>
> >>
> >> On Tue, Feb 19, 2008 at 2:05 AM, David Blevins <david.blevins@visi.com
> >> >
> >> wrote:
> >>
> >>>
> >>> On Jan 5, 2008, at 6:00 PM, Mohammad Nour El-Din wrote:
> >>>
> >>>> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com>
> >>>> wrote:
> >>>>
> >>>>>
> >>>>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
> >>>>>
> >>>>>> I added code to switch from the OpenEJB http server to Jetty when
> >>>>>> the Jetty classes are available.  You can also explicitly state
> >>>>>> which http server impl will be chosen by setting the 'impl'
> >>>>>> property
> >>>>>> in the HttpEjbServer properties.
> >>>>>>
> >>>>>> Let me know if you have any problems.  Also, David if you have
> >>>>>> time
> >>>>>> can you review my changes?  I'm not sure it is how you wanted
> >>>>>> this
> >>>>>> to work (I just hacked something quickly).
> >>>>>
> >>>>> Cool.  Mohammad had mentioned he was going to work on this[1].
> >>>>> Mohammad how does this compare to what you were thinking of doing?
> >>>>>
> >>>> Well Dain read my mind  regarding the configuration property but
> >>>> the
> >>>> new
> >>>> thing is detecting the Jetty classes. I can play with the new code
> >>>> and see
> >>>> how it runs.
> >>>>
> >>>
> >>>
> >>> On Feb 18, 2008, at 12:38 PM, Mohammad Nour El-Din wrote:
> >>>
> >>>> Embedded Jetty is implemented now, needs some more cleaning but the
> >>>> main
> >>>> functionality and tests work just fine, please review
> >>>
> >>> Excellent!  I poked at it a little and switched OpenEJB back to the
> >>> default.  I also implemented some code that allows ServerServices to
> >>> have factories.  This should allow you to write the actual Jetty
> >>> detection part; i.e. the part that checks for a jetty class and
> >>> decides automatically whether to use OpenEJBHttpEjbServer or the new
> >>> JettyHttpEjbServer you wrote.
> >>>
> >>> You should be able to plumb that right into the
> >>> HttpServerFactory.createServerService() method.
> >>>
> >>> Once that is done we likely don't need the jetty-httpejbd file
> >>> anymore.  If someone adds jetty to their openejb install, it should
> >>> just detect it and use it without any need for extra configuration.
> >>>
> >>> -David
> >>>
> >>>
> >>>>> -David
> >>>>>
> >>>>> [1]
> >>>>>
> >>>
> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Thanks
> >>>> - Mohammad Nour
> >>>
> >>>
> >>
> >>
> >> --
> >> Thanks
> >> - Mohammad Nour
> >
> >
> >
> >
> > --
> > Thanks
> > - Mohammad Nour
>
>


-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by David Blevins <da...@visi.com>.
On Feb 19, 2008, at 1:43 AM, Mohammad Nour El-Din wrote:

> OpenEJB build fails on the vmbuild machine
>
> http://marc.info/?l=openejb-cvs&m=120339837024436&w=2
>
> And from the surefire reports I think there is a port conflict of the
> http/jetty service with the http service's port on the vmbuild machine
>
> http://vmbuild.apache.org/continuum/surefireReport.action?buildId=52637&projectId=358#org.apache.openejb.server.httpd.HttpEjbServerTest
>
> I will try to look at it this night unless someone jumps in before  
> me :)

Fixed it.  Looks like the test was hardcoded to use 8080 which is a  
pretty popular port for obvious reasons (continuum itself was using  
that port).  Reverted the test back to using the randomly available  
port strategy.  If you can figure out how to get the random port  
strategy to work with jetty then feel free to add a second test case  
for jetty.

-David

> On Tue, Feb 19, 2008 at 11:21 AM, Mohammad Nour El-Din <mnour@apache.org 
> >
> wrote:
>
>> Gr8, thanks dblevins, I will look at your code to learn what you  
>> did, and
>> use it to impl the Jetty detection.
>>
>>
>> On Tue, Feb 19, 2008 at 2:05 AM, David Blevins <david.blevins@visi.com 
>> >
>> wrote:
>>
>>>
>>> On Jan 5, 2008, at 6:00 PM, Mohammad Nour El-Din wrote:
>>>
>>>> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com>  
>>>> wrote:
>>>>
>>>>>
>>>>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
>>>>>
>>>>>> I added code to switch from the OpenEJB http server to Jetty when
>>>>>> the Jetty classes are available.  You can also explicitly state
>>>>>> which http server impl will be chosen by setting the 'impl'  
>>>>>> property
>>>>>> in the HttpEjbServer properties.
>>>>>>
>>>>>> Let me know if you have any problems.  Also, David if you have  
>>>>>> time
>>>>>> can you review my changes?  I'm not sure it is how you wanted  
>>>>>> this
>>>>>> to work (I just hacked something quickly).
>>>>>
>>>>> Cool.  Mohammad had mentioned he was going to work on this[1].
>>>>> Mohammad how does this compare to what you were thinking of doing?
>>>>>
>>>> Well Dain read my mind  regarding the configuration property but  
>>>> the
>>>> new
>>>> thing is detecting the Jetty classes. I can play with the new code
>>>> and see
>>>> how it runs.
>>>>
>>>
>>>
>>> On Feb 18, 2008, at 12:38 PM, Mohammad Nour El-Din wrote:
>>>
>>>> Embedded Jetty is implemented now, needs some more cleaning but the
>>>> main
>>>> functionality and tests work just fine, please review
>>>
>>> Excellent!  I poked at it a little and switched OpenEJB back to the
>>> default.  I also implemented some code that allows ServerServices to
>>> have factories.  This should allow you to write the actual Jetty
>>> detection part; i.e. the part that checks for a jetty class and
>>> decides automatically whether to use OpenEJBHttpEjbServer or the new
>>> JettyHttpEjbServer you wrote.
>>>
>>> You should be able to plumb that right into the
>>> HttpServerFactory.createServerService() method.
>>>
>>> Once that is done we likely don't need the jetty-httpejbd file
>>> anymore.  If someone adds jetty to their openejb install, it should
>>> just detect it and use it without any need for extra configuration.
>>>
>>> -David
>>>
>>>
>>>>> -David
>>>>>
>>>>> [1]
>>>>>
>>> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks
>>>> - Mohammad Nour
>>>
>>>
>>
>>
>> --
>> Thanks
>> - Mohammad Nour
>
>
>
>
> -- 
> Thanks
> - Mohammad Nour


Re: Jetty detection

Posted by Mohammad Nour El-Din <mn...@apache.org>.
 OpenEJB build fails on the vmbuild machine

http://marc.info/?l=openejb-cvs&m=120339837024436&w=2

And from the surefire reports I think there is a port conflict of the
http/jetty service with the http service's port on the vmbuild machine

http://vmbuild.apache.org/continuum/surefireReport.action?buildId=52637&projectId=358#org.apache.openejb.server.httpd.HttpEjbServerTest

I will try to look at it this night unless someone jumps in before me :)

On Tue, Feb 19, 2008 at 11:21 AM, Mohammad Nour El-Din <mn...@apache.org>
wrote:

> Gr8, thanks dblevins, I will look at your code to learn what you did, and
> use it to impl the Jetty detection.
>
>
> On Tue, Feb 19, 2008 at 2:05 AM, David Blevins <da...@visi.com>
> wrote:
>
> >
> > On Jan 5, 2008, at 6:00 PM, Mohammad Nour El-Din wrote:
> >
> > > On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com> wrote:
> > >
> > >>
> > >> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
> > >>
> > >>> I added code to switch from the OpenEJB http server to Jetty when
> > >>> the Jetty classes are available.  You can also explicitly state
> > >>> which http server impl will be chosen by setting the 'impl' property
> > >>> in the HttpEjbServer properties.
> > >>>
> > >>> Let me know if you have any problems.  Also, David if you have time
> > >>> can you review my changes?  I'm not sure it is how you wanted this
> > >>> to work (I just hacked something quickly).
> > >>
> > >> Cool.  Mohammad had mentioned he was going to work on this[1].
> > >> Mohammad how does this compare to what you were thinking of doing?
> > >>
> > > Well Dain read my mind  regarding the configuration property but the
> > > new
> > > thing is detecting the Jetty classes. I can play with the new code
> > > and see
> > > how it runs.
> > >
> >
> >
> > On Feb 18, 2008, at 12:38 PM, Mohammad Nour El-Din wrote:
> >
> > > Embedded Jetty is implemented now, needs some more cleaning but the
> > > main
> > > functionality and tests work just fine, please review
> >
> > Excellent!  I poked at it a little and switched OpenEJB back to the
> > default.  I also implemented some code that allows ServerServices to
> > have factories.  This should allow you to write the actual Jetty
> > detection part; i.e. the part that checks for a jetty class and
> > decides automatically whether to use OpenEJBHttpEjbServer or the new
> > JettyHttpEjbServer you wrote.
> >
> > You should be able to plumb that right into the
> > HttpServerFactory.createServerService() method.
> >
> > Once that is done we likely don't need the jetty-httpejbd file
> > anymore.  If someone adds jetty to their openejb install, it should
> > just detect it and use it without any need for extra configuration.
> >
> > -David
> >
> >
> > >> -David
> > >>
> > >> [1]
> > >>
> > http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html
> > >>
> > >>
> > >
> > >
> > > --
> > > Thanks
> > > - Mohammad Nour
> >
> >
>
>
> --
> Thanks
> - Mohammad Nour




-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by Mohammad Nour El-Din <mn...@apache.org>.
Gr8, thanks dblevins, I will look at your code to learn what you did, and
use it to impl the Jetty detection.

On Tue, Feb 19, 2008 at 2:05 AM, David Blevins <da...@visi.com>
wrote:

>
> On Jan 5, 2008, at 6:00 PM, Mohammad Nour El-Din wrote:
>
> > On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com> wrote:
> >
> >>
> >> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
> >>
> >>> I added code to switch from the OpenEJB http server to Jetty when
> >>> the Jetty classes are available.  You can also explicitly state
> >>> which http server impl will be chosen by setting the 'impl' property
> >>> in the HttpEjbServer properties.
> >>>
> >>> Let me know if you have any problems.  Also, David if you have time
> >>> can you review my changes?  I'm not sure it is how you wanted this
> >>> to work (I just hacked something quickly).
> >>
> >> Cool.  Mohammad had mentioned he was going to work on this[1].
> >> Mohammad how does this compare to what you were thinking of doing?
> >>
> > Well Dain read my mind  regarding the configuration property but the
> > new
> > thing is detecting the Jetty classes. I can play with the new code
> > and see
> > how it runs.
> >
>
>
> On Feb 18, 2008, at 12:38 PM, Mohammad Nour El-Din wrote:
>
> > Embedded Jetty is implemented now, needs some more cleaning but the
> > main
> > functionality and tests work just fine, please review
>
> Excellent!  I poked at it a little and switched OpenEJB back to the
> default.  I also implemented some code that allows ServerServices to
> have factories.  This should allow you to write the actual Jetty
> detection part; i.e. the part that checks for a jetty class and
> decides automatically whether to use OpenEJBHttpEjbServer or the new
> JettyHttpEjbServer you wrote.
>
> You should be able to plumb that right into the
> HttpServerFactory.createServerService() method.
>
> Once that is done we likely don't need the jetty-httpejbd file
> anymore.  If someone adds jetty to their openejb install, it should
> just detect it and use it without any need for extra configuration.
>
> -David
>
>
> >> -David
> >>
> >> [1]
> >>
> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html
> >>
> >>
> >
> >
> > --
> > Thanks
> > - Mohammad Nour
>
>


-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by David Blevins <da...@visi.com>.
On Jan 5, 2008, at 6:00 PM, Mohammad Nour El-Din wrote:

> On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com> wrote:
>
>>
>> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
>>
>>> I added code to switch from the OpenEJB http server to Jetty when
>>> the Jetty classes are available.  You can also explicitly state
>>> which http server impl will be chosen by setting the 'impl' property
>>> in the HttpEjbServer properties.
>>>
>>> Let me know if you have any problems.  Also, David if you have time
>>> can you review my changes?  I'm not sure it is how you wanted this
>>> to work (I just hacked something quickly).
>>
>> Cool.  Mohammad had mentioned he was going to work on this[1].
>> Mohammad how does this compare to what you were thinking of doing?
>>
> Well Dain read my mind  regarding the configuration property but the  
> new
> thing is detecting the Jetty classes. I can play with the new code  
> and see
> how it runs.
>


On Feb 18, 2008, at 12:38 PM, Mohammad Nour El-Din wrote:

> Embedded Jetty is implemented now, needs some more cleaning but the  
> main
> functionality and tests work just fine, please review

Excellent!  I poked at it a little and switched OpenEJB back to the  
default.  I also implemented some code that allows ServerServices to  
have factories.  This should allow you to write the actual Jetty  
detection part; i.e. the part that checks for a jetty class and  
decides automatically whether to use OpenEJBHttpEjbServer or the new  
JettyHttpEjbServer you wrote.

You should be able to plumb that right into the  
HttpServerFactory.createServerService() method.

Once that is done we likely don't need the jetty-httpejbd file  
anymore.  If someone adds jetty to their openejb install, it should  
just detect it and use it without any need for extra configuration.

-David


>> -David
>>
>> [1]
>> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html
>>
>>
>
>
> -- 
> Thanks
> - Mohammad Nour


Re: Jetty detection

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Well Dain read my mind  regarding the configuration property but the new
thing is detecting the Jetty classes. I can play with the new code and see
how it runs.

On Jan 5, 2008 12:50 PM, David Blevins <da...@visi.com> wrote:

>
> On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:
>
> > I added code to switch from the OpenEJB http server to Jetty when
> > the Jetty classes are available.  You can also explicitly state
> > which http server impl will be chosen by setting the 'impl' property
> > in the HttpEjbServer properties.
> >
> > Let me know if you have any problems.  Also, David if you have time
> > can you review my changes?  I'm not sure it is how you wanted this
> > to work (I just hacked something quickly).
>
> Cool.  Mohammad had mentioned he was going to work on this[1].
> Mohammad how does this compare to what you were thinking of doing?
>
> -David
>
> [1]
> http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html
>
>


-- 
Thanks
- Mohammad Nour

Re: Jetty detection

Posted by David Blevins <da...@visi.com>.
On Jan 3, 2008, at 12:29 PM, Dain Sundstrom wrote:

> I added code to switch from the OpenEJB http server to Jetty when  
> the Jetty classes are available.  You can also explicitly state  
> which http server impl will be chosen by setting the 'impl' property  
> in the HttpEjbServer properties.
>
> Let me know if you have any problems.  Also, David if you have time  
> can you review my changes?  I'm not sure it is how you wanted this  
> to work (I just hacked something quickly).

Cool.  Mohammad had mentioned he was going to work on this[1].   
Mohammad how does this compare to what you were thinking of doing?

-David

[1] http://www.nabble.com/Re%3A-Webservice-support-in-standalone-OpenEJB-p14478246.html