Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to inject Map instance to ejb3

 
zb cong
Ranch Hand
Posts: 416
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic