Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Necessary Deployment Descriptor

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all

In which circumstances is a deployment descriptor necessary? I know about the following points:

- General Interceptor
- Message Destination

Are there other aspects?

Thanks in advance.
Christian
 
author
Posts: 580
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Christian,

A DD is not needed for message destinations. I think global interceptors are the only realistic use case where DD is unavoidable.

Cheers,
Reza
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. How do you specify message-destination-link in annotations?
2. When you use DD to assign method-permissions and container-transactions, you can set different values for methods with the same signature from Local and Remote interfeces (method-intf subelement). How can you achive this with annotations?
 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The deployment descriptor also offers some other possibilities that don't have a direct equivalent in annotations:

- define the invocation order of interceptors

- mapping of role names used in isCallerInRole and defined in the system via "role-link" in "security-role-ref" element

- declaring predefined runtime exceptions (for instance java.lang.ArithmeticException) as application exceptions

- assigning a transaction attribute to all overloaded versions of a business method in a single step: in annotations every single method has to be annotated! (OK, this isn't really an argument to switch from annotations to deployment descriptors).

- simple environment entries can only be defined in the deployment descriptor
[ December 07, 2008: Message edited by: Ralph Jaus ]
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ralph Jaus:
The deployment descriptor also offers some other possibilities that don't have a direct equivalent in annotations:

- define the invocation order of interceptors

- mapping of role names used in isCallerInRole and defined in the system via "role-link" in "security-role-ref" element

- declaring predefined runtime exceptions (for instance java.lang.ArithmeticException) as application exceptions

- assigning a transaction attribute to all overloaded versions of a business method in a single step: in annotations every single method has to be annotated! (OK, this isn't really an argument to switch from annotations to deployment descriptors).

- simple environment entries can only be defined in the deployment descriptor

[ December 07, 2008: Message edited by: Ralph Jaus ]



hi Ralph Jaus,

I think your 1,2 and 4 are just overriding annotations default behaviors while 3 and 5 are truly not possible using annotations.
[ December 08, 2008: Message edited by: Chaminda Amarasinghe ]
 
Ralph Jaus
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chaminda wrote:

I think your 1,2 and 4 are just overriding annotations default behaviors

1. and 2. enable a system behavoir that couldn't be achieved by annotations.

Concerning 4: One may say, it's possible to reproduce what is done by a single <method> element by using several annotations. But in this sense a default interceptor can also be reproduced through annotating every single bean with @Interceptors.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic