Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Adding an EJB 3.0 to DD
Adding an EJB 3.0 to DD [message #214865] Thu, 05 June 2008 14:06 Go to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

I know now in Java EE 5.0 Deployment Descriptors are optional. But I
would like to have my EJB 3.0 declared in the DD. Is there any way to
force an EJB 3.0 to be added automatically? I haven't found how to do it.

Thanks in advance,

Chemi.
Re: Adding an EJB 3.0 to DD [message #215043 is a reply to message #214865] Tue, 10 June 2008 13:21 Go to previous messageGo to next message
Kaloyan Raev is currently offline Kaloyan RaevFriend
Messages: 201
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
What do you mean by "to be added automatically"?

There are two ways for users to create EJB 3.0 projects with DD.
1. Select the "Generate deployment descriptor" checkbox on the second page
of the "New EJB Project" wizard.
2. If you have already created an EJB 3.0 project with no DD, then
right-click on the project and execute Java EE Tools > Generate Deployment
Descriptor Stub.

HTH,
Kaloyan

"Chemi" <jmordax@terra.es> wrote in message
news:g28s41$a7k$1@build.eclipse.org...
>I know now in Java EE 5.0 Deployment Descriptors are optional. But I would
>like to have my EJB 3.0 declared in the DD. Is there any way to force an
>EJB 3.0 to be added automatically? I haven't found how to do it.
>
> Thanks in advance,
>
> Chemi.
Re: Adding an EJB 3.0 to DD [message #215062 is a reply to message #215043] Tue, 10 June 2008 18:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Kaloyan Raev wrote:
> What do you mean by "to be added automatically"?
>
> There are two ways for users to create EJB 3.0 projects with DD.
> 1. Select the "Generate deployment descriptor" checkbox on the second page
> of the "New EJB Project" wizard.
> 2. If you have already created an EJB 3.0 project with no DD, then
> right-click on the project and execute Java EE Tools > Generate Deployment
> Descriptor Stub.
>
> HTH,
> Kaloyan
What I mean is that EJBs are not added to the DD.
As you said I have created the EJB Project with the check box checked.
Then I develop an EJB following POJO style: an Interface with @Local and
a Class with @Stateless that implements the Interface.
When I expand the EJB Project, I can see the EJB but when I open the DD
I can't see it detailed. So I was looking for an automatic way to add
the EJB to the existing DD (I say automatic because I don't want to
write all the stuff manually).

Thanks,

Chemi..
Re: Adding an EJB 3.0 to DD [message #215085 is a reply to message #215062] Wed, 11 June 2008 08:53 Go to previous messageGo to next message
Kaloyan Raev is currently offline Kaloyan RaevFriend
Messages: 201
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Chemi,

In EJB 3.0 deployment descriptor information is spread in both the
ejb-jar.xml deployment descriptor and Java annotations like @Stateless and
@Local. You can implement an annotated POJO like you do and you don't need
to describe it additionally in the ejb-jar.xml. The EJB 3.0 container where
you deploy the EJB module will parse the annotations and will recognize your
beans. This is one of the great new features in the EJB 3.0 specification.

The deployment descriptor node in the Project Explorer that you see displays
a merged view from the ejb-jar.xml and the annotations in your code.

If you still need the annotations metadata to be duplicated in the
ejb-jar.xml, probably because you may need to change the deployment
configuration later, then you may take a look at bug
https://bugs.eclipse.org/196271.

Another approach is to extend the Session Bean wizard to generate the
deployment descritpor metadata not in Java annotation, but in the
ejb-jar.xml, or in both places. If that make sense to you, then please open
an enhancement request in the bugzilla and we will consider this for the
next release.

Greetings,
Kaloyan

"Chemi" <jmordax@terra.es> wrote in message
news:g2mgf7$45j$1@build.eclipse.org...
> Kaloyan Raev wrote:
>> What do you mean by "to be added automatically"?
>>
>> There are two ways for users to create EJB 3.0 projects with DD.
>> 1. Select the "Generate deployment descriptor" checkbox on the second
>> page of the "New EJB Project" wizard.
>> 2. If you have already created an EJB 3.0 project with no DD, then
>> right-click on the project and execute Java EE Tools > Generate
>> Deployment Descriptor Stub.
>>
>> HTH,
>> Kaloyan
> What I mean is that EJBs are not added to the DD.
> As you said I have created the EJB Project with the check box checked.
> Then I develop an EJB following POJO style: an Interface with @Local and a
> Class with @Stateless that implements the Interface.
> When I expand the EJB Project, I can see the EJB but when I open the DD I
> can't see it detailed. So I was looking for an automatic way to add the
> EJB to the existing DD (I say automatic because I don't want to write all
> the stuff manually).
>
> Thanks,
>
> Chemi..
Re: Adding an EJB 3.0 to DD [message #215101 is a reply to message #215085] Wed, 11 June 2008 13:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Kaloyan Raev wrote:
> Hi Chemi,
>
> In EJB 3.0 deployment descriptor information is spread in both the
> ejb-jar.xml deployment descriptor and Java annotations like @Stateless and
> @Local. You can implement an annotated POJO like you do and you don't need
> to describe it additionally in the ejb-jar.xml. The EJB 3.0 container where
> you deploy the EJB module will parse the annotations and will recognize your
> beans. This is one of the great new features in the EJB 3.0 specification.
>
> The deployment descriptor node in the Project Explorer that you see displays
> a merged view from the ejb-jar.xml and the annotations in your code.
>
> If you still need the annotations metadata to be duplicated in the
> ejb-jar.xml, probably because you may need to change the deployment
> configuration later, then you may take a look at bug
> https://bugs.eclipse.org/196271.
>
> Another approach is to extend the Session Bean wizard to generate the
> deployment descritpor metadata not in Java annotation, but in the
> ejb-jar.xml, or in both places. If that make sense to you, then please open
> an enhancement request in the bugzilla and we will consider this for the
> next release.
>
> Greetings,
> Kaloyan
Thanks for the answer. That is exactly what I was looking for... I
understand the DD are optional but from an administration point of view
and maintenance I have found always easier to open a DD and check how
many EJBs are there, which kinds, etc.... instead to have to analyze the
Source Code.

I opened following request:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236621

Regards,

Chemi.
Re: Adding an EJB 3.0 to DD [message #215109 is a reply to message #215101] Wed, 11 June 2008 14:02 Go to previous message
Kaloyan Raev is currently offline Kaloyan RaevFriend
Messages: 201
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Thanks, Chemi. I appreciate your end user point of view.
We will continue discussing this topic and solution in the bug entries you
have created.

Greetings,
Kaloyan

"Chemi" <jmordax@terra.es> wrote in message
news:g2oka3$dv1$1@build.eclipse.org...
> Kaloyan Raev wrote:
>> Hi Chemi,
>>
>> In EJB 3.0 deployment descriptor information is spread in both the
>> ejb-jar.xml deployment descriptor and Java annotations like @Stateless
>> and @Local. You can implement an annotated POJO like you do and you don't
>> need to describe it additionally in the ejb-jar.xml. The EJB 3.0
>> container where you deploy the EJB module will parse the annotations and
>> will recognize your beans. This is one of the great new features in the
>> EJB 3.0 specification.
>>
>> The deployment descriptor node in the Project Explorer that you see
>> displays a merged view from the ejb-jar.xml and the annotations in your
>> code.
>>
>> If you still need the annotations metadata to be duplicated in the
>> ejb-jar.xml, probably because you may need to change the deployment
>> configuration later, then you may take a look at bug
>> https://bugs.eclipse.org/196271.
>>
>> Another approach is to extend the Session Bean wizard to generate the
>> deployment descritpor metadata not in Java annotation, but in the
>> ejb-jar.xml, or in both places. If that make sense to you, then please
>> open an enhancement request in the bugzilla and we will consider this for
>> the next release.
>>
>> Greetings,
>> Kaloyan
> Thanks for the answer. That is exactly what I was looking for... I
> understand the DD are optional but from an administration point of view
> and maintenance I have found always easier to open a DD and check how many
> EJBs are there, which kinds, etc.... instead to have to analyze the Source
> Code.
>
> I opened following request:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=236621
>
> Regards,
>
> Chemi.
Previous Topic:deployment with wtp includes no lib jars
Next Topic:Re: eclipse 3.2.2 with tomcat 6 ?
Goto Forum:
  


Current Time: Fri Apr 26 01:07:45 GMT 2024

Powered by FUDForum. Page generated in 0.03133 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top