tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cae Fernandes <>
Subject Maven + OpenEjb 3.1.2 Embed + spring 3 + tomcat (6.0.14 / mvn:tomcat plugin doesn't work
Date Wed, 04 Nov 2009 13:17:25 GMT
Hello guys,

I would like some help please, I'll try to provide as much info as
I'm developing a new project with maven, I decided to go with OpenEJb for
it's light embeded capabilities and also its spring integration.

So, basically, embending openEjb would allow for my project to run with
mvn:tomcat plugin.
It doesn't.

The problem is, in order for openEjb features to work, there is a
dependency: org.apache.openejb + javaee-api - 5.0-2, which is geronimo's
javaee api.
The thing is that this API conflicts with tomcat's servlet api. This is
actually pretty well known elsewhere. I found a post in a jira somewhere
talking about this, and saying how the user had to replace tomcat's servlet
jar with jeronimo's for this to work. But this doesn't seem like an embed
solution for me. The solution that worked for me was to get javaee6's SDK
modules from glassfish and put it inside tomcat's lib directory, excludind
geronimos's javaee api jars. But again, not an embed solution. I want to be
able to do mvn install, mvn tomcat:run !
I thought about downloading a javaeeapi.jar from maven, but not geronimo's
since it generated conflict, but there are no 'oficial' spots to download
this kind of jar, since it only comes with java ee SDK. I saw at openejb's
website that it was tested and it worked embeded with tomcat 6.0.14, That
was the tomcat local version I tried to make it work with and it didn't. I
wonder what could be the solution for this? Any OpenEJB embed solution with
any tomcat + spring will require a j2ee api of some sort, since tomcat's
default installation does not come with it.

Any thoughts?

The second thing is I declared a org.apache.openejb.spring.Resource
DataSource bean with spring and it worked.
But, I tried binding it back with spring jdniobjectfactory and I cannot find
the DataSource resource bound to the JDNI env.
I tried a whole bunch of paths, com:env:, java:env:Resource, tried looking
up only the bean id itself, nothing worked. Since there is no OpenEJB JNDI
Browser, how can I look at whatever is bound to jndi? I did this:

<bean id="MySQLDataSource" name="MySQLDataSource"
type=javax.sql.DataSource etc.. it worked, I could do a select at the DB and
everything, I saw openejb's log saying it was configuring the service as
default jdbc provider. I just think it may not have bound it to the jndi env
(I tried all names and paths described at openejb documentation online).

Any help is apreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message