Friday, June 18, 2010

EJB annotations and Stereotyping

Certainly for the EJB-related annotations, I would love to see @Stateless, @Stateful, @Singleton and @MessageDriven be used for stereotyping as well as all the other class level annotations for transactions, security, locking, timeouts and scheduling.

Great security example:

 @RolesAllowed({"SuperUser", "AccountAdmin", "SystemAdmin"})
 @Stereotype
 @Target(METHOD)
 @Retention(RUNTIME)
 public @interface Admins {}
In one swoop all the security rolls become controlled in one spot and there's no need to go changing a million usages to modify the roll names.

Here's a couple great scheduling examples:

 @Schedule(second=”0”, minute=”0”, hour=”0”, month=”*”, dayOfWeek=”*”, year=”*”)
 @Stereotype
 @Target(METHOD)
 @Retention(RUNTIME)
 public @interface Daily {}
 @Schedule(second=”0”, minute=”0”, hour=”0”, month=”*”, dayOfMonth=”15,Last”, year=”*”)
 @Stereotype
 @Target(METHOD)
 @Retention(RUNTIME)
 public @interface BiMonthly {}
The list goes on and on. A much fuller example:
@Stereotype
@Singleton
@TransactionManagement(CONTAINER)
@TransactionAttribute(REQUIRED)
@ConcurrencyManagement(CONTAINER)
@Lock(READ)
@RolesAllowed({"SuperUser", "AccountAdmin", "SystemAdmin"})
@Interceptors({LoggingInterceptor.class, StatisticsInterceptor.class})
@Target(TYPE)
@Retention(RUNTIME)
public @interface SuperBean {}
And to use all that, just:
@SuperBean
public class MyBean {

    public void doSomething() {
        
    }
}

73 comments:

Heiko said...

This for sure looks interesting. Would you allow stereotypes to inherit from each other?

For the @Daily stereotype: I voted in the EJB3 cycle to directly have such keywords (basically what you have in newer cron implementations) within @Schedule

David Blevins said...

Sure, I would allow stereotypes to inherit from each other. Having a lot of levels will add indirection and potentially slow down your deployments, but I don't see any issues giving people that choice.

Definitely the cron built-in @hourly @daily, etc. were an inspiration for me as well and I did make this proposal in EJB 3.1 while we were talking about @Schedule. There was definitely interest and we might see it in a future EJB spec -- though likely after EJB 3.2.

I've worked on it in OpenEJB and am hoping to have a prototype in another week.

Unknown said...

20170619 junda
oakley sunglasses sale
cheap jerseys wholesale
burberry outlet sale
cheap ray ban sunglasses
adidas uk store
michael kors outlet clearance
cheap nba jerseys
true religion outlet
ray ban sunglasses
nike air max 90

Unknown said...

Court marriage in thane
court marriage in mumbai
marriage registration in thane
marriage registration in mumbai
Out of State Marriage registration in Thane
Temple marriage in thane
Christian marriage in thane

Unknown said...

This is a very good article material and it is very useful for us all. thank you . cara menggugurkan kandungan

Habib Malik said...

AP SSC Time Table 2018
AP Intermediate Time Table 2018
Goa SSC Date Sheet 2018
Goa Board HSSC Date Sheet 2018

Danish Ahmed said...

Thanks for sharing this article, now you can also check your Admit card & Recuritment 2017 by following below given links...

police si admit card 2017

gpsc medical officer admit card 2017

tamilnadu teacher recuritment 2017

bihar police constable recuritment 2017

gujarat high court recruitment 2017

Farhan Khan said...

FCI Watchman

Admit Card 2017

CG SET Admit Card

2017

MP Patwari

Admit Card 2017

JEE Main 2018

Application Form

PNRD Assam

REcruitment 2017

Danish Ahmed said...

Thanks for sharing this article, now you can also check your Recuritment & Notification 2017-2018 by following below given links...

fci andhra pradesh watchman recuritment 2017

fci tamilnadu watchman recuritment 2017

xat notification 2018

jkbote polytechnic result 2017

Habib Malik said...

Kalyani University Routine 2018
Tripura Board Madhyamim Date Sheet 2018
Tripura Board HS Date Sheet 2018
Telangana SSC Date Sheet 2018
Telanagana Intermediate Date Sheet 2018

adidas nmd said...

nhl jerseys
cheap ray bans
oakley sunglasses wholesale
ralph lauren polo
fitflops sale clearance
nike blazer pas cher
christian louboutin shoes
cheap ray ban sunglasses
oakley sunglasses
nike outlet

http://aakarconstruction.co.in/ said...

awesome for valuable information. now you can also check your latest luxury project in Mumbai, Lucknow, Hyderabad, Thane, Pune, Delhi, Gujrat by following below given links...

Construction Companies in Mumbai
Construction Companies in Thane
Construction Companies in Pune
Construction Companies in Lucknow
Construction Companies in Hyderabad
Construction Companies in Delhi
Construction Companies in Gujrat

Habib Malik said...

GSAT Application Form 2018
HP Application Form 2018
Karnataka DCET Application Form 2018
RIE EEE Application Form 2018
SSC CGL Application Form 2018

Unknown said...

I really love this post I will visit again to read your post in a very short time and I hope you will make more posts like this.
cara menggugurkan hamil

Unknown said...

thanks david for worderful addition visit my site Kamagra bestellen

Unknown said...

I really love this post I will visit again to read your post in a very short time please also related post visit my site Courier to Australia

justinsmith said...

Thanks for sharing this article. visit my blog ed medicine health care related Kamagra

Pillenpalast said...

magnificent for significant data. Checkout my Blog Kamagra

Unknown said...

Thanks for sharing this article. visit my blog ed medicine health care related Kamagra

Unknown said...

Thanks for posting this blog. visit my blog ed medicine health care related Kamagra bestellen

Unknown said...

Thanks for such nice posting this blog. visit my blog ed medicine healthcare related Sildenafil bestellen

robertbrett505 said...

Thanks for posting this blog. visit my blog ed medicine health care related Vardenafil bestellen

Unknown said...

Thanks for sharing your article I really love this post I will visit again to read your post in a very short time Visit my website the medicine which cure impotence Kamagra kaufen

Unknown said...

Thank you for sharing your valuable information. It is very useful for us, Please visit below us:- Kamagra

Unknown said...

Thank you for sharing your valuable information. It is very useful for us Visit our site
Buy Nutrition Supplements in Goregaon
Buy Dietary Supplements in Goregaon
Buy Nutrition Supplements in Tardeo
Buy Nutrition Supplements in peddar road
Buy Nutrition Supplements in Cuffe Parade

gunardi said...

Definitely believe that which you said. Your favorite reason appeared to be on the web the easiest thing to be aware of. I say to you, I definitely get irked while people think about worries that they just do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will likely be back to get more. Thanks
Tangki Panel
Tangki Fiberglass
Jual Septic Tank
Tangki Kimia
Jual Talang Fiber
Jual Rotameter
jual mesin ro
Jual Botol Plastik Agro

Jual Botol Plastik Murah

Unknown said...

a very nice blog keep going

Regards:
Kamagra bestellen

Unknown said...

please check link
Kamagra bestellen

Unknown said...

Vielen Dank für den Austausch Ihrer Informationen. Bitte besuchen Sie uns unter:-

Kamagra kaufen

jesperl1230 said...

Thank you for sharing your valuable information. It is very useful for us Visit our site
Acheter Kamagra

Unknown said...

awesome for valuable information Kamagra Kaufen

syed said...

Nice Article. do you know something about nautical lights

Jonny Ank said...

Thank you for sharing your valuable information.
Gold Jewellery Price In Kuwait
Kuwait Gold Jewelry Price

syed said...

information is very much valuable. nautical lights are amazing

Hamad Ali said...

Thank you for sharing your valuable information.

Kuwait Online Shopping
Kuwait offers
Gaming pc

farahkhalf12 said...

Thank you for sharing your valuable information.

Gold price in Kuwait
Gold Rate in Kuwait
Today Gold Rate in Kuwait
Kuwait Gold Jewelry Price

nourahsabah12 said...

Thank you for sharing your valuable information.
online gold ring shopping
Gold Ring Design

Aminah Khalf said...

Awesome for valuable information
pure gold Kuwait offers
pure gold jewellery online
Pure Gold Jewellery Kuwait

nourahsabah12 said...

Nice Article. do you know something about
online gold ring shopping
Gold Ring Design

Unknown said...

Awesome for valuable information

printers in kuwait shopping
printers

ralphluft777 said...

thanks for sharing such a nice blog more go to visit https://www.uno-apotheke.com/

Digital Dunyaa said...

google ads expert in mumbai

Unknown said...

Nice Article. do you know something about
gold rate in dubai
gold rate in UAE
gold price in dubai
today gold rate in dubai

Jennyjoshua25 said...

Nice Article do you know something about
gold rate in dubai
gold rate in uae
gold price in dubai
today gold rate in dubai

POOJA said...





If you want a babe from the house of Call Girls in Mahipalpur there are a few things you should know well before making a booking. Firstly our agency here at your city. In simple words is a cut above the rest because of the highly professional services we provide to our clients. Check our other Services...
Female Escorts in Aerocity
Escorts in Aerocity
Russian Escorts in Aerocity
Russian Escorts in Mahipalpur
Call Girls in Aerocity



HOT AND SEXY INDEPENDENT ESCORTS IN LUCKNOW said...

THANK YOU FOR VISITING MY WEBSITE:-
russian escorts in gurgaon
housewife escorts in gurgaon
gurgaon escort services
gurgaon escorts
escorts in gurgaon
escort services in gurgaon
gurgaon call girls
call girls in gurgaon

Ms Nikita Agarwal said...

Very Good way of attracting your reader's attention is to write blog like you. Please do contact me on genuinehotelescorts@gmail.com for
Jaipur call girls
Jaipur call girls
Jaipur call girls
Delhi call girls
Guwahati call girls
Guwahati call girls
Guwahati call girls
Guwahati call girls
Aerocity call girls
Lucknow call girls

Anonymous said...


Kanpur Escorts
Mumbai Escorts
Navi Mumbai Escorts
Noida Escorts
Pune Escorts
Ramagundam Escorts

Thane Escorts
Vasai-Virar Escorts
Ahmedabad Escorts
Bangalore Escorts

Anonymous said...

Udaipur Escorts
Ulhasnagar Escorts
Vadodara Escorts
Varanasi Escorts

Vijayawada Escorts
Visakhapatnam Escorts
Warangal Escorts
Vapi Escorts
Ujjain Escorts
Agartala Escorts

Anonymous said...


Pimpri-Chinchwad Escorts
Port Blair Escorts
Raipur Escorts
Rajahmundry Escorts
Rajkot Escorts
Ranchi Escorts

Rourkela Escorts
Saharanpur Escorts
Salem Escorts
Sangli Escorts

Anonymous said...

Mangalore Escorts
Meerut Escorts
Mysore Escorts
Nagpur Escorts

Nanded Escorts
Nashik Escorts
Nellore Escorts
Kolkata Escorts
Panaji Escorts
Patiala Escorts

Anonymous said...

Kochi Escorts
Kolhapur Escorts

Kozhikode Escorts
Kurnool Escorts
Loni Escorts
Lucknow Escorts
Ludhiana Escorts
Madurai Escorts

Maheshtala Escorts
Malegaon Escorts

Anonymous said...

Hyderabad Escorts
Indore Escorts
Itanagar Escorts
Jabalpur Escorts
Jaipur Escorts
Jalandhar Escorts

Jhansi Escorts
Jodhpur Escorts
Kakinada Escorts
Kalyan-Dombivali Escorts

Anonymous said...

Agra Escorts
Akola Escorts
Aligarh Escorts
Allahabad Escorts
Amravati Escorts
Amritsar Escorts

Bareilly Escorts
Belgaum Escorts
Bhavnagar Escorts
Bhilai Escorts

Anonymous said...

bulk SMS reseller

nituroy.com said...

Very nicely written blog...Relly loved reading it...Please check my blogs for
Jaipur Escorts
Jaipur Escorts
Jaipur Escorts
Delhi Escorts
Guwahati Escorts
Guwahati Escorts
Guwahati Escorts
Guwahati Escorts
Lucknow Escorts
Aerocity Escorts

ncrhotgirls.com said...

Thanks for sharing this nice piece of information. I really loved reading it. In case you want to read mine kindly click bellow:-
Escort services in Jaipur
Escort services in Jaipur
Escort services in Jaipur
Escort services in Delhi
Escort services in Guwahati
Escort services in Guwahati
Escort services in Guwahati
Escort services in Guwahati
Escort services in Lucknow
Escort services in Aerocity

Unknown said...

If you are frustrated in your life and looking for some changes, then it's high time.
Make a plan and travel to Guwahati escort and choose here Guwahati call girl service.
It will remove your tension from life and make your life smooth.
Assamese call girls in Guwahati
College escorts in Guwahati
Housewife escorts in Guwahati
Nepali escorts in Guwahati
Escort service in Guwahati

Unknown said...

Explore the profiles of guwahati escorts, guwahati call girls, call girls in guwahati and
escorts in guwahati for female companionship in top rated hotels.
Get affordable escort services in guwahati hotels now.
Guwahati call girls
Call girls in Guwahati

johnankm12 said...

تبديل بطارية السيارة
تبديل بطاريات سيارات
تبديل بطاريه السياره
بطارية سيارة
بطاريات سيارات

sachinmehera139 said...

Thanks for sharing this very informative blog

laptop in kuwait
laptop price in kuwait
laptop price
hp laptop price
laptop

henryank12 said...

Thanks for sharing this very informative blog

printers in Kuwait
printers
inkjet printer
hp printers
Laserjet printer
printer

Escorts Service Kolkata said...

escorts service in kolkata |
escorts service in kolkata |
escorts service in kolkata |
escorts service in kolkata |
escorts service in kolkata |

Unknown said...


Thanks for sharing this very informative blog


Fingerprint time attendance in kuwait
FBiometric in kuwait​
Online HR system in Kuwait
Fingerprint machine in kuwait
Door access machine kuwait
security systems
CCTV security systems

Kamagra Pure said...

The KAMAGRAPURE https://kamagrapure.com/ company is the best-selling medical products provider in Germany. Company deals in medicine for adults. This brand is in the market for around ten years with a medical shop in Germany. Kamagra Buy the best quality products, faster

Fast Delivery and easy checkout.

kleinralph9 said...

star-apotheke ist das in Deutschland ansässige Unternehmen mit Hauptsitz in der besten Stadt Deutschlands. Ich bin Klein Ralph Der Manager des Unternehmens, wir sind in der Gesundheits- und Fitnessbranche tätig. Kamagra Kaufen Besuchen Sie weiter unsere Website

pharmaeu24 said...

Pharmaeu24 ist seit vielen Jahren mit gutem Ruf auf dem Markt. Dieses Unternehmen hat seinen Sitz in Deutschland und hat ein Sanitätshaus in der Hauptstadt Deutschlands. wir haben aktuell viele laufende Angebote auf unserer Website

Checke jetzt aus- Kamagra kaufen

Sven Furst said...

kamagrabest Da Tomcat einen so großen Teil des Marktes beherrscht, ist die Tatsache, dass sich Entwickler auf etwas so Grundlegendes nicht einigen konnten, ein größtes Problem. Wir haben nur wenige Leute ausgewählt, die normalerweise mit der bestehenden Wahl nicht zufrieden waren. Da die meisten Leute, die Tomcat verwenden, tatsächlich eine Reihe von Java EE-Technologien verwenden, war die Vision, sie zu erreichen, ziemlich klar. Sowohl Java EE als auch Tomcat mussten geändert werden. für mehr check mein blog Kamagra Kaufen

Ralf Ziegler said...

Thanks for sharing this very informative blog

Visit: Kamagra Kaufen

markfosio said...

Amazing stuffs right here. I enjoyed reading these comments all the way

gold rate in UAE
gold price in UAE
21k gold

maidoceastes said...

첫째, 사이트에 암호화 시스템이 있는지 온라인카지노 확인하십시오. 이렇게하면 사이트에 입력 할 때 정보가 보호되도록합니다. 사이트가 라이센스가 부여되고 규제되는지 확인해야합니다.

ElenaMilani said...

Commander du Viagra

Super kamagra said...
This comment has been removed by the author.