I deployed my application to JBoss AS 7.1.1.Final and realised that my @Produces annotations were not really producing... But they were working fine with Arquillian.
It was my programming error.
This does not work
@ApplicationScoped
public class TrackMappersFactory {
@EJB
private AudiobookMapper audiobookMapper;
@EJB
private PodcastMapper podcastMapper;
@EJB
private SongMapper songMapper;
@EJB
private VideoMapper videoMapper;
@Produces
@AggregateMapper
public Map<Class<? extends TrackTo>, TrackMapper<? extends TrackTo>> getAggregateTrackMapper() {
The reason why is simple, this class is not detected by the container because it's not an EJB. The solution is to make it a @Singleton bean instead.
This works
@Singleton
public class TrackMappersFactory {
@EJB
private AudiobookMapper audiobookMapper;
@EJB
private PodcastMapper podcastMapper;
@EJB
private SongMapper songMapper;
@EJB
private VideoMapper videoMapper;
@Produces
@AggregateMapper
public Map<Class<? extends TrackTo>, TrackMapper<? extends TrackTo>> getAggregateTrackMapper() {
Here is the
diff for this change.
I feel good about your share. I am so happy to see your blog. Do My Homework Thank you for sharing it with us.
ReplyDeleteVery much like your beloved football crew, you won't ever walk alone when you want task help in liverpool. Our expert task aides will give you all the essential Assignment Done For You help according to your guidelines and will offer extra work to guarantee your task gets appropriate appreciation.
ReplyDeleteThis is it! You can use this service and be raddy for help! Enjoy your life and be rady for this! Check this personal statement writing help help adn go on! Enjoy your life adn be rady for wins! Enjoy your life and be ready for you! Good luck!
ReplyDeleteI sent my application to JBoss AS 7.1.1.Final and understood that my @Produces explanations were not actually creating... Yet, they were turned out great with Arquillian. It was my programming error.The justification for what reason is straightforward, this class isn't identified by the compartment since it's anything but an EJB. The arrangement is to make it a @Singleton bean all things considered. divorce lawyer charlottesville
ReplyDelete