You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by zeros <se...@gmail.com> on 2008/03/24 12:57:24 UTC

ejb-jar.xml and EJB 3.0

Good morning:

  I'm having problems deploying an EJB3 with a deployment descriptor. I've
not had any problems deploying it only with tags, but when I add the
ejb-jar.xml to fix the final values Geronimo detects the EJB like an EJB2
instead of 3. 


    I've found no example of Geronimo, ejb-jar.xml and EJB3. Maybe anyone
has tested it? It should be possible as the deployment descriptor is
optional, but not deprecated.


Thanks in advance

(Here I attach my ejb-jar.xml)


<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
	<enterprise-beans>
		<session>
			<ejb-name>HelloWorldBean</ejb-name>
			<remote>test.vpod.HelloWorld</remote>
			<local>test.vpod.HelloWorldLocal</local>
			<ejb-class>test.vpod.HelloWorldBean</ejb-class>
			<session-type>Stateless</session-type>
			<transaction-type>Container</transaction-type>
		</session>
	</enterprise-beans>
</ejb-jar>
-- 
View this message in context: http://www.nabble.com/ejb-jar.xml-and-EJB-3.0-tp16249489s134p16249489.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: ejb-jar.xml and EJB 3.0

Posted by David Blevins <da...@visi.com>.

zeros wrote:
> 
> Thanks a lot. It was the solution. In the documentation which I have, the
> local and remote interfaces are shown by <remote></remote> and
> <local></local>, but substituing those by
> <business-local></business-local> and <business-remote></business-remote>
> it works perfectly.
> 
> With tags i meant @Local and @Remote
> 
> Thanks a lot again
> 

Just a note.  In the latest trunk code we now fully check for this common
mistake as well as any other possible misuses of the <home>, <remote>,
<local-home>, <local>, <business-local>, and <business-remote> elements of
the ejb-jar.xml.  We don't just check that the value supplied is correct,
but we also attempt to determine what you supplied and tell you the correct
element should be.  All combined there are now 44 different possible error
messages we're prepared to issue to cover the many different scenarios.

Hopefully no one else will have to loose any time to this mistake.

-David



-- 
View this message in context: http://www.nabble.com/ejb-jar.xml-and-EJB-3.0-tp16249489s134p18523547.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: ejb-jar.xml and EJB 3.0

Posted by zeros <se...@gmail.com>.
Thanks a lot. It was the solution. In the documentation which I have, the
local and remote interfaces are shown by <remote></remote> and
<local></local>, but substituing those by <business-local></business-local>
and <business-remote></business-remote> it works perfectly.


With tags i meant @Local and @Remote


Thanks a lot again
-- 
View this message in context: http://www.nabble.com/ejb-jar.xml-and-EJB-3.0-tp16249489s134p16274117.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: ejb-jar.xml and EJB 3.0

Posted by Manu George <ma...@gmail.com>.
Hi Sergio,

On Mon, Mar 24, 2008 at 5:27 PM, zeros <se...@gmail.com> wrote:
>
>  Good morning:
>
>   I'm having problems deploying an EJB3 with a deployment descriptor. I've
>  not had any problems deploying it only with tags, but when I add the
>  ejb-jar.xml to fix the final values Geronimo detects the EJB like an EJB2
>  instead of 3.
>
What do you mean by deploying it only with tags?

>
>     I've found no example of Geronimo, ejb-jar.xml and EJB3. Maybe anyone
>  has tested it? It should be possible as the deployment descriptor is
>  optional, but not deprecated.
>
>
>  Thanks in advance
>
>  (Here I attach my ejb-jar.xml)
>
>
>  <?xml version="1.0" encoding="UTF-8"?>
>  <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>  http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
>         <enterprise-beans>
>                 <session>
>                         <ejb-name>HelloWorldBean</ejb-name>
>                         <remote>test.vpod.HelloWorld</remote>
>                         <local>test.vpod.HelloWorldLocal</local>
>                         <ejb-class>test.vpod.HelloWorldBean</ejb-class>
>                         <session-type>Stateless</session-type>
>                         <transaction-type>Container</transaction-type>
>                 </session>
>         </enterprise-beans>
>  </ejb-jar>
>  --

You do not seem to have business interfaces defined? Without business
interfaces, I believe that the ejb will be treated similar to an ejb
2.1 bean for lookup. Business interfaces are defined using the the
elements business-local and business-remote in the plan.

Regards
Manu

>  View this message in context: http://www.nabble.com/ejb-jar.xml-and-EJB-3.0-tp16249489s134p16249489.html
>  Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>