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() {
        
    }
}

62 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

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...

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

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



Anonymous said...

bulk SMS reseller

Anonymous 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

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.
PaulHuber said...

Super Kamagra braucht unterschiedliche Zeiten, um bei verschiedenen Männern zu wirken. In den meisten Fällen beträgt sie jedoch zwischen einer halben und einer Stunde. Die Arbeit kann jedoch länger dauern. Es passiert, wenn Sie dieses Medikament mit einer reichhaltigen Mahlzeit einnehmen. Die Wirkung dieses Medikaments kann fast 3-4 Stunden anhalten. https://potenzguru.co/de/super-kamagra

Maik Finkel said...

Kamagrabestellen potenzmittel ist kein Aphrodisiakum, um eine Erektion ohne Stimulation zu erreichen. Es erfordert sowohl geistige als auch körperliche Stimulation während der sexuellen Aktivität. https://kamagrabestellen.cc/

ElenaMilani said...

Op die manier is Kamagra ontworpen om geschikt te zijn voor alle niveaus van mannelijke impotentie en om te functioneren als een stabiel medicijn bij elke lichaamsconditie. Het medicijn heeft een zeer uniek werkingsmechanisme, [url=http://potenzguru.co/de/]Kamagra kaufen[/url]

adamgillm121 said...

Thanks for sharing this very informative blog Buy the Apple iPad Pro M4 https://wibi.com.kw/collections/apple-ipad-pro-m4 in Kuwait for an unmatched user experience. Featuring a powerful M4 chip and a stunning display, the iPad Pro M4 offers unparalleled performance for work and play. Get yours at the best prices today!