Gert,

I just submitted the code to the JIRA Improvement SM-1683 untested. Will
this work?

Sincerely,

Brian

ObjectOrange wrote:
> 
> During jbi.init() I'm getting the NoSuchBeanDefinitionException for
> "broker" as it is loading the "jndi" bean (which depends on "broker").
> Attached is the jndi.xml.
> 
>  http://www.nabble.com/file/p20446414/jndi.xml jndi.xml 
> 
> 
> ObjectOrange wrote:
>> 
>> Gert,
>> 
>> Sorry for the ignorance, my development skills are a little rusty! Could
>> it be that I didn't run the Maven install command?
>> 
>> Sincerely,
>> 
>> Brian
>> 
>> 
>> ObjectOrange wrote:
>>> 
>>> Yes, I'm aware of that. I added new tests to it to test the new
>>> functionality, but when it tries to create a JBI instance, I get the
>>> exception below. I'm using IntelliJ and I had to add the following to
>>> the VM parameters: 
>>> 
>>> -Djava.naming.factory.initial=org.apache.xbean.spring.jndi.SpringInitialContextFactory
>>> -Djava.naming.provider.url=jndi.xml
>>> 
>>> The jndi.xml contains a dependency on a 'broker'. Is this defined in the
>>> servicemix.xml? Is there some reason it's not loading? I have it in on
>>> the classpath.
>>> 
>>> What configurations for the JBI instance am I missing?
>>> 
>>> Exception:
>>> 
>>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>>> named 'broker' is defined
>>>     at
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:356)
>>>     at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:916)
>>>     at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:243)
>>>     at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>>     at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:337)
>>>     at
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>>     at
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>>>     at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>>     at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>>     at
>>> org.apache.xbean.spring.jndi.SpringInitialContextFactory.getInitialContext(SpringInitialContextFactory.java:83)
>>>     at
>>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
>>>     at
>>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
>>>     at javax.naming.InitialContext.init(InitialContext.java:223)
>>>     at javax.naming.InitialContext.<init>(InitialContext.java:175)
>>>     at
>>> org.apache.servicemix.jbi.container.JBIContainer.init(JBIContainer.java:574)
>>>     at
>>> org.apache.servicemix.drools.DroolsComponentTest.setUp(DroolsComponentTest.java:48)
>>>     at
>>> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
>>> 
>>> INFO  - JBIContainer                   - Shutting down ServiceMix JBI
>>> Container (ServiceMix) stopped
>>> Failed to shut down: java.lang.NullPointerException
>>> Disconnected from the target VM, address: '127.0.0.1:2424', transport:
>>> 'socket'
>>> 
>>> Process finished with exit code -1
>>> 
>>> 
>>> 
>>> 
>>> Gert Vanthienen wrote:
>>>> 
>>>> Brian,
>>>> 
>>>> The DroolsComponentTest is a JUnit test.  It can be run manually from 
>>>> within Eclipse by choosing Run as... -> JUnit test or from a command 
>>>> line with 'mvn test' or 'mvn install'.  These tests are also being run 
>>>> automatically as part of the continuous integration and release builds.
>>>> 
>>>> Regards,
>>>> 
>>>> Gert
>>>> 
>>>> ObjectOrange wrote:
>>>>> Gert,
>>>>>
>>>>> How do I get the DroolsComponentTest to load and start a JBI instance?
>>>>> I
>>>>> added the servicemix /conf folder to the classpath, but now I'm being
>>>>> told
>>>>> the no 'broker' exists.
>>>>>
>>>>> Brian
>>>>>
>>>>>
>>>>> Gert Vanthienen wrote:
>>>>>   
>>>>>> Brian,
>>>>>>
>>>>>> The source for the servicemix-drools component is available at 
>>>>>> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-drools/trunk/.
>>>>>> You'll find some information on where to find our issue tracker and
>>>>>> how 
>>>>>> to create patches on http://servicemix.apache.org/contributing.html.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Gert
>>>>>>
>>>>>> ObjectOrange wrote:
>>>>>>     
>>>>>>> Gert,
>>>>>>>
>>>>>>> Yes, the update checks to see if the Exchange has not been handled -
>>>>>>> answer() nor route() have been called - AND the Exchange is an InOut
>>>>>>> type
>>>>>>> AND the endpoint is acting as a Provider prior to calling answer()
>>>>>>> from
>>>>>>> the
>>>>>>> Drools Endpoint.
>>>>>>>
>>>>>>> I'll add this as a patch once I figure out how! :) Do you know how
>>>>>>> to get
>>>>>>> the most recent source?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Brian
>>>>>>>
>>>>>>>
>>>>>>> Gert Vanthienen wrote:
>>>>>>>   
>>>>>>>       
>>>>>>>> Brian,
>>>>>>>>
>>>>>>>> Sure, that's a valid use case.  If answer isn't called in the
>>>>>>>> drools 
>>>>>>>> file, the Exchange is never answered, so if you want to add an
>>>>>>>> attribute 
>>>>>>>> to that endpoint for configuring automatic replies, that's totally 
>>>>>>>> cool!  It was just a warning that some people are using the Drools 
>>>>>>>> component as a router and don't want the exchange to be answered
>>>>>>>> before 
>>>>>>>> the exchange forwarded from drools is done.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Gert
>>>>>>>>
>>>>>>>> ObjectOrange wrote:
>>>>>>>>     
>>>>>>>>         
>>>>>>>>> Gert,
>>>>>>>>>
>>>>>>>>> We're not using Drools as a router, only evaluating XML attributes
>>>>>>>>> against
>>>>>>>>> some rules and then making changes to XML attributes depending on
>>>>>>>>> the
>>>>>>>>> results of those rules; we would like to not have to call answer()
>>>>>>>>> in
>>>>>>>>> the
>>>>>>>>> drools file as the people editing these through a GUI will not
>>>>>>>>> know
>>>>>>>>> what
>>>>>>>>> that means (business users). Presently, if answer() is not called
>>>>>>>>> in a
>>>>>>>>> drools file, will it get called and by what object?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Brian
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Gert Vanthienen wrote:
>>>>>>>>>   
>>>>>>>>>       
>>>>>>>>>           
>>>>>>>>>> Brian,
>>>>>>>>>>
>>>>>>>>>> The first one seems a nice addition to our Drools component, so
>>>>>>>>>> by all 
>>>>>>>>>> means go ahead and supply a patch for it!
>>>>>>>>>>
>>>>>>>>>> Not sure what you want to do with the last one though.  The
>>>>>>>>>> answer 
>>>>>>>>>> method should already answer the exchange, setting the 'out'
>>>>>>>>>> message.  
>>>>>>>>>> As for automatically responding with the request message, how
>>>>>>>>>> will you 
>>>>>>>>>> know when to respond?  The drools endpoint can send another
>>>>>>>>>> exchange
>>>>>>>>>> and 
>>>>>>>>>> that answer can trigger a real response later.  Or would you
>>>>>>>>>> propose
>>>>>>>>>> to 
>>>>>>>>>> make this behavior optional (and configurable through a
>>>>>>>>>> property)?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>>
>>>>>>>>>> Gert
>>>>>>>>>>
>>>>>>>>>> ObjectOrange wrote:
>>>>>>>>>>     
>>>>>>>>>>         
>>>>>>>>>>             
>>>>>>>>>>> Thanks Gert,
>>>>>>>>>>>
>>>>>>>>>>> In the Message class: 
>>>>>>>>>>>
>>>>>>>>>>> The ability to update the value of an XML attribute (identified
>>>>>>>>>>> by an
>>>>>>>>>>> XPath)
>>>>>>>>>>> with a string value or another XML attribute's value (identified
>>>>>>>>>>> by
>>>>>>>>>>> an
>>>>>>>>>>> XPath) within a Message's body.
>>>>>>>>>>>
>>>>>>>>>>> In DroolsEndpoint.drools(MessageExchange):
>>>>>>>>>>>
>>>>>>>>>>> Ensure that if the Exchange was not handled and it's an InOut
>>>>>>>>>>> that
>>>>>>>>>>> the
>>>>>>>>>>> "out"
>>>>>>>>>>> message gets returned (using DroolsExecutionContext.answer() - a
>>>>>>>>>>> new
>>>>>>>>>>> wrapper
>>>>>>>>>>> method to the JBIHelper.answer()) or if the "out" message does
>>>>>>>>>>> not
>>>>>>>>>>> exist
>>>>>>>>>>> or
>>>>>>>>>>> is empty, the "in" message.
>>>>>>>>>>>
>>>>>>>>>>> What do you think?
>>>>>>>>>>>
>>>>>>>>>>> Brian
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Gert Vanthienen wrote:
>>>>>>>>>>>   
>>>>>>>>>>>       
>>>>>>>>>>>           
>>>>>>>>>>>               
>>>>>>>>>>>> Brian,
>>>>>>>>>>>>
>>>>>>>>>>>> The best way to start contributing is by creating a JIRA issue
>>>>>>>>>>>> to 
>>>>>>>>>>>> propose your change and then attach a patch file to it.  You
>>>>>>>>>>>> can
>>>>>>>>>>>> find 
>>>>>>>>>>>> more information about this on 
>>>>>>>>>>>> http://servicemix.apache.org/contributing.html.
>>>>>>>>>>>> What is it you would like to change on the servicemix-drools
>>>>>>>>>>>> component?
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>>
>>>>>>>>>>>> Gert
>>>>>>>>>>>>
>>>>>>>>>>>> ObjectOrange schreef:
>>>>>>>>>>>>     
>>>>>>>>>>>>         
>>>>>>>>>>>>             
>>>>>>>>>>>>                 
>>>>>>>>>>>>> Gert,
>>>>>>>>>>>>>
>>>>>>>>>>>>> If I make changes to the source, how can I get these into the
>>>>>>>>>>>>> build?
>>>>>>>>>>>>> Do
>>>>>>>>>>>>> I
>>>>>>>>>>>>> need to become a committer or can I request the changes to be
>>>>>>>>>>>>> approved
>>>>>>>>>>>>> by
>>>>>>>>>>>>> committers?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Brian
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Gert Vanthienen wrote:
>>>>>>>>>>>>>   
>>>>>>>>>>>>>       
>>>>>>>>>>>>>           
>>>>>>>>>>>>>               
>>>>>>>>>>>>>                   
>>>>>>>>>>>>>> Brian,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> The version of the component that uses the
>>>>>>>>>>>>>> DroolsExecutionContext
>>>>>>>>>>>>>> is
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> most recent one.  The addition of the DroolsExecutionContext
>>>>>>>>>>>>>> is
>>>>>>>>>>>>>> nothing
>>>>>>>>>>>>>> but a simple refactoring, but this version of the component
>>>>>>>>>>>>>> also
>>>>>>>>>>>>>> uses
>>>>>>>>>>>>>> Drools 4.0.x.  It is part of ServiceMix 3.3 and will go into
>>>>>>>>>>>>>> ServiceMix
>>>>>>>>>>>>>> 4.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> This refactoring has not been backported to the ServiceMix
>>>>>>>>>>>>>> 3.2
>>>>>>>>>>>>>> branch
>>>>>>>>>>>>>> and
>>>>>>>>>>>>>> neither has the upgrade to Drools 4.0.x, so ServiceMix 3.2.x
>>>>>>>>>>>>>> still
>>>>>>>>>>>>>> uses
>>>>>>>>>>>>>> Drools 3.x.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Gert
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ObjectOrange wrote:
>>>>>>>>>>>>>>     
>>>>>>>>>>>>>>         
>>>>>>>>>>>>>>             
>>>>>>>>>>>>>>                 
>>>>>>>>>>>>>>                     
>>>>>>>>>>>>>>> I've discovered two differing copies of source for the
>>>>>>>>>>>>>>> Drools SE
>>>>>>>>>>>>>>> component, one using the DroolsExecutionContext and one not.
>>>>>>>>>>>>>>> Which
>>>>>>>>>>>>>>> is
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> most recent?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thx!
>>>>>>>>>>>>>>> Brian
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>       
>>>>>>>>>>>>>>>           
>>>>>>>>>>>>>>>               
>>>>>>>>>>>>>>>                   
>>>>>>>>>>>>>>>                       
>>>>>>>>>>>>>>     
>>>>>>>>>>>>>>         
>>>>>>>>>>>>>>             
>>>>>>>>>>>>>>                 
>>>>>>>>>>>>>>                     
>>>>>>>>>>>>>   
>>>>>>>>>>>>>       
>>>>>>>>>>>>>           
>>>>>>>>>>>>>               
>>>>>>>>>>>>>                   
>>>>>>>>>>>> -----
>>>>>>>>>>>> ---
>>>>>>>>>>>> Gert Vanthienen
>>>>>>>>>>>> http://gertvanthienen.blogspot.com
>>>>>>>>>>>>
>>>>>>>>>>>>     
>>>>>>>>>>>>         
>>>>>>>>>>>>             
>>>>>>>>>>>>                 
>>>>>>>>>>>   
>>>>>>>>>>>       
>>>>>>>>>>>           
>>>>>>>>>>>               
>>>>>>>>>> -----
>>>>>>>>>> ---
>>>>>>>>>> Gert Vanthienen
>>>>>>>>>> http://gertvanthienen.blogspot.com
>>>>>>>>>>
>>>>>>>>>>     
>>>>>>>>>>         
>>>>>>>>>>             
>>>>>>>>>   
>>>>>>>>>       
>>>>>>>>>           
>>>>>>>> -----
>>>>>>>> ---
>>>>>>>> Gert Vanthienen
>>>>>>>> http://gertvanthienen.blogspot.com
>>>>>>>>
>>>>>>>>     
>>>>>>>>         
>>>>>>>   
>>>>>>>       
>>>>>>
>>>>>> -----
>>>>>> ---
>>>>>> Gert Vanthienen
>>>>>> http://gertvanthienen.blogspot.com
>>>>>>
>>>>>>     
>>>>>
>>>>>   
>>>> 
>>>> 
>>>> 
>>>> -----
>>>> ---
>>>> Gert Vanthienen
>>>> http://gertvanthienen.blogspot.com
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ServiceMix-Drools-SE%3A-DroolsExecutionContext-tp20249810p20448088.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to