This content has been marked as final. 
    
Show                 4 replies
    
- 
        1. Re: Access components in codekeithnaas Mar 4, 2008 3:47 PM (in response to frankyb)The examples in the codebase and the docs show how to do this. 31.2. Annotations displays an example Session session = (Session) Component.getInstance("hibernateSession");The *.component names refer to the Seam internal objects. 
- 
        2. Re: Access components in codefrankyb Mar 4, 2008 3:57 PM (in response to frankyb)thank you, that's it! 
- 
        3. Re: Access components in codemattlc.mathieu.lecain.econexia.com May 26, 2008 2:09 AM (in response to frankyb)Hi, I have a problem with this function. Whenever I call it, I get some classCastException. This is the way I call it : private PublicProductSearchBean getPublicProductSearchBean(){ return (PublicProductSearchBean) Component.getInstance("publicProductSearch",true); }
 
 And the session bean declaration is : @Stateful @Name ("publicProductSearch") @Scope(ScopeType.SESSION) public class PublicProductSearchBean implements PublicProductSearch{ .... }
 
 I'm trying to implement web services. The seam doc says that this is the way to access business logic. And this is done exactly the same way in the seam 2.0.0GA (the version I use) seambay example. 
 Any help ? 
- 
        4. Re: Access components in codestephen May 26, 2008 9:36 AM (in response to frankyb)Cast to PublicProductSearch instead?! private PublicProductSearch getPublicProductSearchBean(){ return (PublicProductSearch) Component.getInstance("publicProductSearch",true); }
 
     
     
    