[ 
https://issues.apache.org/activemq/browse/SM-858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved SM-858.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2
         Assignee: Guillaume Nodet

The JBIContainer can now be injected on the POJO, the same way than the 
ComponentContext.

public void setContainer(JBIContainer container) {
}

such a method will be called when the pojo is instanciated.

Author: gnodet
Date: Fri Mar  2 05:54:59 2007
New Revision: 513764

URL: http://svn.apache.org/viewvc?view=rev&rev=513764
Log:
SM-858: The JBIContainer can now be injected on the POJO

Modified:
   
incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java


> Unable to access a JBIContainer using the supplied component context in 
> various endpoints (i.e. JSR181)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SM-858
>                 URL: https://issues.apache.org/activemq/browse/SM-858
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-core, servicemix-http, servicemix-jsr181
>    Affects Versions: 3.1
>            Reporter: jmdev
>         Assigned To: Guillaume Nodet
>             Fix For: 3.2
>
>
> Following the instructions at 
> http://incubator.apache.org/servicemix/how-can-i-access-the-jbicontainer-from-inside-a-component-.html
>  
> a developer should be able to access the JBIContainer from within a JSR181 
> POJO.  However, there is a ClassCastException due to the fact that the 
> ComponentContext returned is of type EndpointComponentContext.  In turn, an 
> EndpointComponentContext does not provide access to it's internal context of 
> type ComponentContext, which allows the developer to get a reference to the 
> JBIContainer.
> Temporary fix can be found here:
> http://www.nabble.com/Error-Accessing-JBI-Container-from-JSR181-Component---Is-it-Possible--tf3281290s12049.html#a9132255

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to