GeeCON Prague 2014*
The moose likes EJB and other Java EE Technologies and the fly likes how to inject Map instance to ejb3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "how to inject Map instance to ejb3" Watch "how to inject Map instance to ejb3" New topic
Author

how to inject Map instance to ejb3

zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
hello,
i know that @resource anotation can inject simple type param into ejb, but how can i inject the complex type, such as Map, into ejb?

Thanks.
Jayr Motta
Ranch Hand

Joined: Jul 30, 2010
Posts: 110

Well,

I can be wrong, and if I do, please correct me. You'll be able to inject just primitive/wrapper types and JavaBeans (getters/setters as properties and no-arg constructors), but Map isn't either of them.

With a pure ejb solution I think you'll not be able to do this. Maybe using a special implementation and CDI / JSR-330.

Regards!


Feel free to ask me anything!
www.BlackBeltFactory.com/ui#!/ref=jmotta, SCJP 6, OCWCD JEE5, OCE EJB JEE6
 
GeeCON Prague 2014
 
subject: how to inject Map instance to ejb3