You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mid491 mid491 <mi...@hotmail.com> on 2010/09/02 09:20:40 UTC

httpejbd address witj embedded EJB

sorry did a mistake with the subject ...I use OpenEJB in embedded mode to test my web services. All work fine with maven, but when I try to run tests from Eclipse (run as -> JUnit Tests) the address used by httpejbd is set to 0.0.0.0  :** Starting Services ** NAME IP PORT 2010-09-02 08:53:17,038 INFO [log] jetty-6.1.212010-09-02 08:53:17,100 DEBUG [log] Container Server@130998 + org.mortbay.thread.QueuedThreadPool@2d09e0 as threadpool2010-09-02 08:53:17,100 DEBUG [log] started org.mortbay.thread.QueuedThreadPool@2d09e02010-09-02 08:53:17,163 DEBUG [log] Container org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null} + ErrorHandler@63f5af as errorHandler2010-09-02 08:53:17,163 DEBUG [log] starting JettyHttpServer$1@95f2902010-09-02 08:53:17,163 DEBUG [log] started JettyHttpServer$1@95f2902010-09-02 08:53:17,163 DEBUG [log] starting org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null}2010-09-02 08:53:17,163 DEBUG [log] starting ErrorHandler@63f5af2010-09-02 08:53:17,163 DEBUG [log] started ErrorHandler@63f5af2010-09-02 08:53:17,163 DEBUG [log] started org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null}2010-09-02 08:53:17,163 DEBUG [log] starting Server@1309982010-09-02 08:53:17,288 DEBUG [log] started org.mortbay.jetty.nio.SelectChannelConnector$1@1eb9fde2010-09-02 08:53:17,288 INFO [log] Started SelectChannelConnector@0.0.0.0:42042010-09-02 08:53:17,288 DEBUG [log] started SelectChannelConnector@0.0.0.0:42042010-09-02 08:53:17,303 DEBUG [log] started Server@130998 httpejbd 0.0.0.0 4204 admin thread 127.0.0.1 4200 ejbd 127.0.0.1 4201 -------my endpointURI is set to 127.0.0.1 into the code and when running tests with Maven (mvn install) all works fine, the address is well set to 127.0.0.1 I 've tried to change the default address with the properties "properties.setProperty("httpejbd.bind", "127.0.0.1");" but the still remains 0.0.0.0 at run time...Did I miss something ? How to have the same address under Maven and Eclipse ?thx ))
 		 	   		  

Re: httpejbd address witj embedded EJB

Posted by Jonathan Gallimore <jo...@gmail.com>.
Hi,

Without seeing your project in Eclipse, its hard to know for sure. I'm
taking a bit of guess here, but do you have JBoss setup as a WTP server in
Eclipse? If so, that would probably add the libs from your JBoss folder to
your project's classpath. If you're able to share your project, or set up a
basic project that reproduces what you're seeing, I'd be happy to take a
look and try explain what's going on.

Jon

On Fri, Sep 3, 2010 at 9:29 AM, mid491 mid491 <mi...@hotmail.com> wrote:

>
> Jon, why under maven the classpath is not the same as under Eclipse/JRun
> command ? (how to see the classpath?)
> I dont't understand why all work fine with Maven and not Eclipse/JRun ? And
> works when I delete JBoss directory (I guess it s because the libs are no
> more scanned)
> why the httpejbd change to 0.0.0.0 ?
>
>
> thanx for helping ^^

RE: httpejbd address witj embedded EJB

Posted by mid491 mid491 <mi...@hotmail.com>.

Hi,
Found it at last! you are right, I had on my project a dependency from another project ((layer)) that had a dependency  to JBoss ... (Java Build Path->libraries)
/self bonk ^^
many thanks to you for the suggestion Jon :)
>Hi,>Without seeing your project in Eclipse, its hard to know for sure. I'm>taking a bit of guess here, but do you have JBoss setup as a WTP server in>Eclipse? If so, that would probably add the libs from your JBoss folder to>your project's classpath. If you're able to share your project, or set up a>basic project that reproduces what you're seeing, I'd be happy to take a>look and try explain what's going on.>Jon
> From: mid491@hotmail.com
> To: users@openejb.apache.org
> Subject: RE: httpejbd address witj embedded EJB
> Date: Fri, 3 Sep 2010 10:29:12 +0200
> 
> 
> Jon, why under maven the classpath is not the same as under Eclipse/JRun command ? (how to see the classpath?)
> I dont't understand why all work fine with Maven and not Eclipse/JRun ? And works when I delete JBoss directory (I guess it s because the libs are no more scanned)
> why the httpejbd change to 0.0.0.0 ?
> 
> 
> thanx for helping ^^ 		 	   		  
 		 	   		  

RE: httpejbd address witj embedded EJB

Posted by mid491 mid491 <mi...@hotmail.com>.
Jon, why under maven the classpath is not the same as under Eclipse/JRun command ? (how to see the classpath?)
I dont't understand why all work fine with Maven and not Eclipse/JRun ? And works when I delete JBoss directory (I guess it s because the libs are no more scanned)
why the httpejbd change to 0.0.0.0 ?


thanx for helping ^^ 		 	   		  

Re: httpejbd address witj embedded EJB

Posted by Jonathan Gallimore <jo...@gmail.com>.
Hi,

If you're testing your application using an embedded instance of OpenEJB, we
will by default, scan your classpath looking for applications to deploy. You
can reduce what parts of your classpath are included by using
openejb.deployments.classpath.include
and openejb.deployments.classpath.exclude properties. There's some
information on this page:
http://openejb.apache.org/3.0/application-discovery-via-the-classpath.html

Essentially you'll need to do something like:

Properties p = new Properties();
p.put("openejb.deployments.classpath.include", /* path to your compiled EJBs
here */);
p.put("java.naming.factory.initial ", "
org.apache.openejb.client.LocalInitialContextFactory");

InitialContext ctx = new InitialContext(p);

Hope that helps.

Jon

On Thu, Sep 2, 2010 at 3:44 PM, mid491 mid491 <mi...@hotmail.com> wrote:

>
> I am very sorry for the bad message's formatting  (using Hotmait and Rich
> text but don't work well..)
> I found something strange :
> - when I run the Junit test form Eclipse, I got some traces like "INFO
>  [config] Found ClientModule in classpath: (path)\jboss-5.1.0.GA\lib\jaxb-xjc.jar
> (a lot of traces like that)- why Openejb (or Eclipse/Jrun? ) nedd to look
> inside jboss directory ??? and how that happen ?
>
> If I remove my Jboss directory (or rename it) my problem fly away, all
> works fine ! any explications ???
> (Notice that anyway, all works fine outisde Eclipse (HELIOS), I mean under
> Maven 2.)
>
>
>
>
> > From: mid491@hotmail.com
> > To: users@openejb.apache.org
> > Subject: httpejbd address witj embedded EJB
> > Date: Thu, 2 Sep 2010 09:20:40 +0200
> >
> >
> > sorry did a mistake with the subject ...
> I use OpenEJB in embedded mode to test my web services. All work fine with
> maven, but when I try to run tests from Eclipse (run as -> JUnit Tests) the
> address used by httpejbd is set to 0.0.0.0 :** Starting Services ** NAME IP
> PORT 2010-09-02 08:53:17,038 INFO [log] jetty-6.1.212010-09-02 08:53:17,100
> DEBUG [log] Container Server@130998 +
> org.mortbay.thread.QueuedThreadPool@2d09e0 as threadpool2010-09-02
> 08:53:17,100 DEBUG [log] started
> org.mortbay.thread.QueuedThreadPool@2d09e02010-09-02 08:53:17,163 DEBUG
> [log] Container org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null} +
> ErrorHandler@63f5af as errorHandler2010-09-02 08:53:17,163 DEBUG [log]
> starting JettyHttpServer$1@95f2902010-09-02 08:53:17,163 DEBUG [log]
> started JettyHttpServer$1@95f2902010-09-02 08:53:17,163 DEBUG [log]
> starting org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null}2010-09-02
> 08:53:17,163 DEBUG [log] starting ErrorHandler@63f5af2010-09-0208:53:17,163 DEBUG [log] started ErrorHandler@63f5af2010-09-0208:53:17,163 DEBUG [log] started
> org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null}2010-09-02
> 08:53:17,163 DEBUG [log] starting Server@1309982010-09-02 08:53:17,288
> DEBUG [log] started
> org.mortbay.jetty.nio.SelectChannelConnector$1@1eb9fde2010-09-0208:53:17,288 INFO [log] Started SelectChannelConnector@0.0.0.0:42042010-09-02
> 08:53:17,288 DEBUG [log] started SelectChannelConnector@0.0.0.0:42042010-09-02
> 08:53:17,303 DEBUG [log] started Server@130998 httpejbd 0.0.0.0 4204 admin
> thread 127.0.0.1 4200 ejbd 127.0.0.1 4201 -------my endpointURI is set to
> 127.0.0.1 into the code and when running tests with Maven (mvn install) all
> works fine, the address is well set to 127.0.0.1 I 've tried to change the
> default address with the properties "properties.setProperty("httpejbd.bind",
> "127.0.0.1");" but the still remains 0.0.0.0 at run time...Did I miss
> something ? How to have the same address under Maven and Eclipse ?
> thx ))
> >
>
>

RE: httpejbd address witj embedded EJB

Posted by mid491 mid491 <mi...@hotmail.com>.
I am very sorry for the bad message's formatting  (using Hotmait and Rich text but don't work well..)
I found something strange :
- when I run the Junit test form Eclipse, I got some traces like "INFO  [config] Found ClientModule in classpath: (path)\jboss-5.1.0.GA\lib\jaxb-xjc.jar (a lot of traces like that)- why Openejb (or Eclipse/Jrun? ) nedd to look inside jboss directory ??? and how that happen ?

If I remove my Jboss directory (or rename it) my problem fly away, all works fine ! any explications ???
(Notice that anyway, all works fine outisde Eclipse (HELIOS), I mean under Maven 2.)




> From: mid491@hotmail.com
> To: users@openejb.apache.org
> Subject: httpejbd address witj embedded EJB
> Date: Thu, 2 Sep 2010 09:20:40 +0200
> 
> 
> sorry did a mistake with the subject ...
I use OpenEJB in embedded mode to test my web services. All work fine with maven, but when I try to run tests from Eclipse (run as -> JUnit Tests) the address used by httpejbd is set to 0.0.0.0 :** Starting Services ** NAME IP PORT 2010-09-02 08:53:17,038 INFO [log] jetty-6.1.212010-09-02 08:53:17,100 DEBUG [log] Container Server@130998 + org.mortbay.thread.QueuedThreadPool@2d09e0 as threadpool2010-09-02 08:53:17,100 DEBUG [log] started org.mortbay.thread.QueuedThreadPool@2d09e02010-09-02 08:53:17,163 DEBUG [log] Container org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null} + ErrorHandler@63f5af as errorHandler2010-09-02 08:53:17,163 DEBUG [log] starting JettyHttpServer$1@95f2902010-09-02 08:53:17,163 DEBUG [log] started JettyHttpServer$1@95f2902010-09-02 08:53:17,163 DEBUG [log] starting org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null}2010-09-02 08:53:17,163 DEBUG [log] starting ErrorHandler@63f5af2010-09-02 08:53:17,163 DEBUG [log] started ErrorHandler@63f5af2010-09-02 08:53:17,163 DEBUG [log] started org.mortbay.jetty.handler.ContextHandler@1afd9cc{/,null}2010-09-02 08:53:17,163 DEBUG [log] starting Server@1309982010-09-02 08:53:17,288 DEBUG [log] started org.mortbay.jetty.nio.SelectChannelConnector$1@1eb9fde2010-09-02 08:53:17,288 INFO [log] Started SelectChannelConnector@0.0.0.0:42042010-09-02 08:53:17,288 DEBUG [log] started SelectChannelConnector@0.0.0.0:42042010-09-02 08:53:17,303 DEBUG [log] started Server@130998 httpejbd 0.0.0.0 4204 admin thread 127.0.0.1 4200 ejbd 127.0.0.1 4201 -------my endpointURI is set to 127.0.0.1 into the code and when running tests with Maven (mvn install) all works fine, the address is well set to 127.0.0.1 I 've tried to change the default address with the properties "properties.setProperty("httpejbd.bind", "127.0.0.1");" but the still remains 0.0.0.0 at run time...Did I miss something ? How to have the same address under Maven and Eclipse ?
thx ))
>