Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebLogic12C + Eclipse Indigo develop JSF 2.0 with CDI

 
kim kao
Greenhorn
Posts: 7
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello, guys.
Oracle weblogic 12c has just released recently. I'm trying to develop jsf 2.0 with managed bean using injection mechanism on it.
But, only when i annotated the bean with @Managed , the backing bean did work.
If annotated the backing bean with @Named , that the backing bean didn't.
So, i supposed that is the CDI implementing jar is not correctly setup on classpath, but where is it ?
Just find out all the eclipse workspace and oracle lib folders , haven't see it.
anybody who has fallen in struggled like me ?
 
kim kao
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kim kao wrote:hello, guys.
Oracle weblogic 12c has just released recently. I'm trying to develop jsf 2.0 with managed bean using injection mechanism on it.
But, only when i annotated the bean with @Managed , the backing bean did work.
If annotated the backing bean with @Named , that the backing bean didn't.
So, i supposed that is the CDI implementing jar is not correctly setup on classpath, but where is it ?
Just find out all the eclipse workspace and oracle lib folders , haven't see it.
anybody who has fallen in struggled like me ?


hello, guys ..
i found the tricky problem is that should put a empty but include the <beans> tag beans.xml file.
But i'm still confused with this empty file, is it play a key role with weld.jar ?
Here are my project settings.

beans.xml


web.xml


backingbean


presentation face page
 
Kumaravadivel Subramani
Ranch Hand
Posts: 171
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes the empty beans.xml file does the key role of scanning the folder for java class files for annotation where it is placed. As you see this in weld.jar's one of the source file named as DefaultAnnotationProvider.java, the scanner does the scanning of the folders and other jar files only when it has empty beans.xml file is present. For more information kindly have a look at this DefaultAnnotationProvider file. Hope this clears your doubt.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic