tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Davidson" <stephen.david...@etcc.com>
Subject RE: Include Classpath not sharing Deployed EJBs?
Date Thu, 04 Feb 2010 23:35:22 GMT
Hi David.

I have attached a demo project, which shows (in a much reduced scale)
what I am experiencing.  As the Demo project does not have a delegate
tier, I had the Integration Test call the Servlet.  In the project, we
have a Delegate Tier that the Servlets call to access the EJBs, and the
test cases are calling the Delegates instead.

As attached, the project works.  Delete the ejb-jar.xml file from the
EJB Jar, and watch it fail on "mvn clean install".  The goal in the
Integration test is;
mvn integration-test

To just start jetty, mvn jetty:run

Something odd I noticed with the Demo project is that the generated ear
file is being deployed twice.  In the case of no ejb-jar.xml file, the
EJBs are deployed only once (the first pass), but not on the second pass
(which seems to be the Test Pass).  

In the case of ejb-jar.xml file present, the EJBs are apparently
deployed twice as well.

I've confirmed this occurs for my application for both cases.

Any thoughts?

-Steve

-----Original Message-----
From: David Blevins [mailto:david.blevins@visi.com] 
Sent: Sunday, January 31, 2010 12:40 PM
To: users@openejb.apache.org
Subject: Re: Include Classpath not sharing Deployed EJBs?

Hmm.  Everything seems in order.  Is it possible you can make a sample  
we can use to reproduce it?  Not sure what else to recommend.

-David

On Jan 29, 2010, at 5:46 PM, Stephen Davidson wrote:

> Ok, I missed something here.
>
> In both cases, with & without ejb-jar.xml, EJBs are getting deployed.
> Just, in one case, the client applications are not actually able to
> access the EJBs, but in the other, they are.  The log from the "Not
> Found" case shows the EJBs are getting deployed, but your response  
> says
> that they might not be (which is where I got confused).
>
> Service(id=Default Stateless Container, type=Container,
> provider-id=Default Stateless Container) INFO - Auto-creating a
> container for bean com/etcc/Account:
> Container(type=STATELESS, id=Default Stateless Container) INFO -
> Enterprise application "classpath.ear" loaded.
> INFO - Assembling app: classpath.ear
> INFO - Jndi(name=com/etcc/StateLocal) -->
> Ejb(deployment-id=com/etcc/State)
>
> ...
>
> Running com.etcc.csc.delegate.StateDelegateEjbTest
> TRACE - Getting EJB Client for: com.etcc.csc.service.StateInterface
> TRACE - Loading service: State
> TRACE - Loading service: State
> DEBUG - Unable to access EJB State: Name "com/etcc/StateLocal" not
> found.
> javax.naming.NameNotFoundException: Name "com/etcc/StateLocal" not
> found.
>
>
> I figured your scanner issue might be causing an issue.  Initially,  
> w/o
> the ejb-jar.xml file, the EJBs were not getting deployed at all.   
> Hence,
> per
>
http://openejb.apache.org/3.0/application-discovery-via-the-classpath.ht
> ml,
> I had set
>                        <systemProperty>
>
> <name>openejb.deployments.classpath.include</name>
>
> <value>.*services-${service.version}.*</value>
>                        </systemProperty>
>
> This resulted in the EJBs apparently getting deployed, at least, as  
> far
> as was recorded in the log.  But it looks like a step was missed  
> during
> deployment?
>
> -Steve
>
> -----Original Message-----
> From: David Blevins [mailto:david.blevins@visi.com]
> Sent: Friday, January 29, 2010 4:57 AM
> To: users@openejb.apache.org
> Subject: Re: Include Classpath not sharing Deployed EJBs?
>
>
> On Jan 26, 2010, at 6:15 PM, Stephen Davidson wrote:
>
>> The odd thing is, this works when there IS a ejb-jar.xml file.  Only
>> when there is no ejb-jar.xml does this fail.
>
> It sounds like this might be related to the properties issue.  By
> default the "classpath scan" include/exclude settings filter out
> everything resulting in us just looking for ejb-jar.xml files in the
> classpath rather than scanning class files to find apps.
>
> We will log any properties that you change on INFO level, so if it
> doesn't show up, we aren't seeing it.
>
>
> -David
>
> -- 
> http://blog.dblevins.com/
> http://twitter.com/dblevins
> Like OpenEJB?  Tweet it!
>
>
>
>


Mime
View raw message