[jira] Commented: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
[ https://issues.apache.org/activemq/browse/SM-944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40459 ] Andreas Schaefer commented on SM-944: - Yes, that issue is fixed with the fix from SM-1110 and can be marked as resolved. IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne Attachments: servicemix-bean.BeanEndpoint.java.diff 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] java.lang.IllegalStateException: Receiving unknown consumer exchange: InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] at org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:268) at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) 08:11:11,845 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 60 | Error setting exchange status to ERROR javax.jbi.messaging.MessagingException: illegal call to send / sendSync
[jira] Commented: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
[ https://issues.apache.org/activemq/browse/SM-944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40455 ] Guillaume Nodet commented on SM-944: Andreas, is this one fixed by having fixed SM-1110 ? IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne Attachments: servicemix-bean.BeanEndpoint.java.diff 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] java.lang.IllegalStateException: Receiving unknown consumer exchange: InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] at org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:268) at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) 08:11:11,845 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 60 | Error setting exchange status to ERROR javax.jbi.messaging.MessagingException: illegal call to send / sendSync
[jira] Resolved: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
[ https://issues.apache.org/activemq/browse/SM-944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved SM-944. Resolution: Fixed Fix Version/s: 3.2 3.1.3 IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne Fix For: 3.1.3, 3.2 Attachments: servicemix-bean.BeanEndpoint.java.diff 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] java.lang.IllegalStateException: Receiving unknown consumer exchange: InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] at org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:268) at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) 08:11:11,845 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 60 | Error setting exchange status to ERROR javax.jbi.messaging.MessagingException: illegal call to send / sendSync
Re: ServiceMix Bean issues with send()
So, basically, there is no concept of consumer endpoint: an exchange is sent from a component to an endpoint. Inside servicemix components, we usually have this concept of consumer endpoint, but in such case, this means that the component has to dispatch the incoming exchange back to the endpoint that sent it. On 10/19/07, Andreas Schaefer [EMAIL PROTECTED] wrote: HI Guillaume I hope you are right even though I am not quite sure how you want to figure out the service name of the consumer. I still think it is a problem of the core. Even if we can fix the problem inside the Bean BC the problem may arise on other BCs as well. I think that we should not only have a source component but also a source service name or any form of internal identification of the source SU. BTW today I am at home and so we may can discuss this through IRC if you want. -Andy Guillaume Nodet wrote: I had some time to look at your test case on the plane and i think i found a fix. In all cases i'm quite sure that the problem comes from the component and not from the container. The fix is mainly to inject on the pojo a delivery channel that will track consumer exchanges sent by the bean. That way, the component will know about the exchange and will not throw an exception. 2007/10/19, Andreas Schaefer (2) [EMAIL PROTECTED]: Tomorrow I plan to try to fix this issue but if anyone sees a flaw in my design please stop beforehand. Today I finally resolved the problem of how does ServiceMix know to which component it should send the Message Exchange (ME) back even though it uses the wrong Service Name. Inside the AbstractFlow.doRouting() it uses the SourceId from the ME to find the correct Binding Component (BC). That is why in my test project the call goes back tot he Bean BC even though it tries to call a service that is actually based on a Script BC. This makes me hopeful that applying the same logic to the service name could fix the issue. That is what I want to do to fix it: - service name is removed from the packet and placed inside the ME (maybe also the endpoint) - the ME.setServiceName() is actually set on the MIRROR.serviceName member (so that I don't have to change the logic of switching the ME with its MIRROR) - the consumer's service name is set on the ME before the ME is sent onto the flow. This is either done on the Message Exchange Factory or on the Delivery Channel which is probably the better choice because then on the way back the service name of the provider can also be set if not already done). I just have to figure out how to obtain the service name of the sending SU from within the Delivery Channel. I think that should do the trick even though I don't know what the implications on the SYNCHRONOUS ME are and hope that I am not going to open Pandora's Box. Thanks - Andy -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re: ServiceMix Bean issues with send()
HI Guillaume I hope you are right even though I am not quite sure how you want to figure out the service name of the consumer. I still think it is a problem of the core. Even if we can fix the problem inside the Bean BC the problem may arise on other BCs as well. I think that we should not only have a source component but also a source service name or any form of internal identification of the source SU. BTW today I am at home and so we may can discuss this through IRC if you want. -Andy Guillaume Nodet wrote: I had some time to look at your test case on the plane and i think i found a fix. In all cases i'm quite sure that the problem comes from the component and not from the container. The fix is mainly to inject on the pojo a delivery channel that will track consumer exchanges sent by the bean. That way, the component will know about the exchange and will not throw an exception. 2007/10/19, Andreas Schaefer (2) [EMAIL PROTECTED]: Tomorrow I plan to try to fix this issue but if anyone sees a flaw in my design please stop beforehand. Today I finally resolved the problem of how does ServiceMix know to which component it should send the Message Exchange (ME) back even though it uses the wrong Service Name. Inside the AbstractFlow.doRouting() it uses the SourceId from the ME to find the correct Binding Component (BC). That is why in my test project the call goes back tot he Bean BC even though it tries to call a service that is actually based on a Script BC. This makes me hopeful that applying the same logic to the service name could fix the issue. That is what I want to do to fix it: - service name is removed from the packet and placed inside the ME (maybe also the endpoint) - the ME.setServiceName() is actually set on the MIRROR.serviceName member (so that I don't have to change the logic of switching the ME with its MIRROR) - the consumer's service name is set on the ME before the ME is sent onto the flow. This is either done on the Message Exchange Factory or on the Delivery Channel which is probably the better choice because then on the way back the service name of the provider can also be set if not already done). I just have to figure out how to obtain the service name of the sending SU from within the Delivery Channel. I think that should do the trick even though I don't know what the implications on the SYNCHRONOUS ME are and hope that I am not going to open Pandora's Box. Thanks - Andy
Re: ServiceMix Bean issues with send()
I had some time to look at your test case on the plane and i think i found a fix. In all cases i'm quite sure that the problem comes from the component and not from the container. The fix is mainly to inject on the pojo a delivery channel that will track consumer exchanges sent by the bean. That way, the component will know about the exchange and will not throw an exception. 2007/10/19, Andreas Schaefer (2) [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tomorrow I plan to try to fix this issue but if anyone sees a flaw in my design please stop beforehand. Today I finally resolved the problem of how does ServiceMix know to which component it should send the Message Exchange (ME) back even though it uses the wrong Service Name. Inside the AbstractFlow.doRouting() it uses the SourceId from the ME to find the correct Binding Component (BC). That is why in my test project the call goes back tot he Bean BC even though it tries to call a service that is actually based on a Script BC. This makes me hopeful that applying the same logic to the service name could fix the issue. That is what I want to do to fix it: - - service name is removed from the packet and placed inside the ME (maybe also the endpoint) - - the ME.setServiceName() is actually set on the MIRROR.serviceName member (so that I don't have to change the logic of switching the ME with its MIRROR) - - the consumer's service name is set on the ME before the ME is sent onto the flow. This is either done on the Message Exchange Factory or on the Delivery Channel which is probably the better choice because then on the way back the service name of the provider can also be set if not already done). I just have to figure out how to obtain the service name of the sending SU from within the Delivery Channel. I think that should do the trick even though I don't know what the implications on the SYNCHRONOUS ME are and hope that I am not going to open Pandora's Box. Thanks - Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHGADWs4gPTNnP0gkRAsNpAJ9knS8kX0NfIbAMW+uGgBjIN0i3zQCfceDi rdw1L46NBoZnzqQzLYILOEw= =VDq2 -END PGP SIGNATURE- -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re: ServiceMix Bean issues with send()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tomorrow I plan to try to fix this issue but if anyone sees a flaw in my design please stop beforehand. Today I finally resolved the problem of how does ServiceMix know to which component it should send the Message Exchange (ME) back even though it uses the wrong Service Name. Inside the AbstractFlow.doRouting() it uses the SourceId from the ME to find the correct Binding Component (BC). That is why in my test project the call goes back tot he Bean BC even though it tries to call a service that is actually based on a Script BC. This makes me hopeful that applying the same logic to the service name could fix the issue. That is what I want to do to fix it: - - service name is removed from the packet and placed inside the ME (maybe also the endpoint) - - the ME.setServiceName() is actually set on the MIRROR.serviceName member (so that I don't have to change the logic of switching the ME with its MIRROR) - - the consumer's service name is set on the ME before the ME is sent onto the flow. This is either done on the Message Exchange Factory or on the Delivery Channel which is probably the better choice because then on the way back the service name of the provider can also be set if not already done). I just have to figure out how to obtain the service name of the sending SU from within the Delivery Channel. I think that should do the trick even though I don't know what the implications on the SYNCHRONOUS ME are and hope that I am not going to open Pandora's Box. Thanks - Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHGADWs4gPTNnP0gkRAsNpAJ9knS8kX0NfIbAMW+uGgBjIN0i3zQCfceDi rdw1L46NBoZnzqQzLYILOEw= =VDq2 -END PGP SIGNATURE-
[jira] Commented: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
[ https://issues.apache.org/activemq/browse/SM-944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40421 ] Andreas Schaefer commented on SM-944: - So far I figured out that one part of the problem is caused by the private member of request. I saw that there are two different Bean Endpoint instances used, one for the provider and one for the consumer and so they cannot see each others requests. I fixed that problem by finding the other endpoints of the same Bean and searching for the request of all of them. This way the request can be found if the consumer and provider are both based on a Bean BC. Unfortunately because of the issue SM-1110 (https://issues.apache.org/activemq/browse/SM-1110) the same exception will be thrown as well because it even tries to call a Bean Endpoint without an Bean SU. This fix may not solve the issue or is not caused what this fix tries to accomplish because of the tight integration with SM-1110. This is the diff: Index: BeanEndpoint.java === --- BeanEndpoint.java (revision 586179) +++ BeanEndpoint.java (working copy) @@ -82,12 +82,15 @@ private ComponentContext context; private DeliveryChannel channel; +private BeanComponent mBeanComponent; + public BeanEndpoint() { } public BeanEndpoint(BeanComponent component, ServiceEndpoint serviceEndpoint) { super(component, serviceEndpoint); this.applicationContext = component.getApplicationContext(); +mBeanComponent = component; } public void start() throws Exception { @@ -103,6 +106,9 @@ if (getMethodInvocationStrategy() == null) { throw new IllegalArgumentException(No 'methodInvocationStrategy' property set); } +if (mBeanComponent == null) { +mBeanComponent = (BeanComponent) getServiceUnit().getComponent(); +} } @@ -262,7 +268,8 @@ protected void onConsumerExchange(MessageExchange exchange) throws Exception { Object corId = exchange.getExchangeId(); -Request req = requests.remove(corId); +//Request req = requests.remove(corId); +Request req = findRequest(corId, true); if (req == null) { throw new IllegalStateException(Receiving unknown consumer exchange: + exchange); } @@ -431,4 +438,18 @@ public void setCorrelationExpression(org.apache.servicemix.expression.Expression correlationExpression) { this.correlationExpression = correlationExpression; } + +private Request findRequest(Object pCorrelationId, boolean pDoRemove) { +Request lReturn = null; +for (BeanEndpoint lEndpoint : mBeanComponent.getEndpoints()) { +lReturn = lEndpoint.requests.get(pCorrelationId); +if (lReturn != null) { +if (pDoRemove) { +lEndpoint.requests.remove(pCorrelationId); +} +break; +} +} +return lReturn; +} } IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest
[jira] Updated: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
[ https://issues.apache.org/activemq/browse/SM-944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Schaefer updated SM-944: Attachment: servicemix-bean.BeanEndpoint.java.diff The diff I tried to add unsuccessfully to my comment. It should fix the side effects I see. IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne Attachments: servicemix-bean.BeanEndpoint.java.diff 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] java.lang.IllegalStateException: Receiving unknown consumer exchange: InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] at org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:268) at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) 08:11:11,845 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 60 | Error setting exchange status to ERROR javax.jbi.messaging.MessagingException: illegal call to send
Re: ServiceMix Bean issues with send()
Hi Geeks I am moving this thread to the DEV mailing list because it not about using ServiceMix anymore. The problem is that when using the asynchronous message exchange that the response is not sent back to the calling SU but to the Provider Endpoint of the called SU. I just keep on spinning here. I have a closer look at the MessageExchangeImpl and saw that the Mirror references the same packet and beside the ROLE and STATUS everything else is set or retrieved from the packet. This means that always the MIRROR is pointing to the same service, endpoint etc. Creating a new ME it will be of role CONSUMER and the mirror is of role PROVIDER. The Delivery Channel (DC) will send the ME using the mirror and so the DC will send it to the target service PROVIDER endpoint. When the response is sent back the DC will use the MIRROR (of the MIRROR), which has not the role CONSUMER, but because of the same packet it will use the same Service / Endpoint / Interface Name meaning the message is sent back to the same service with the only exception that the ME is send to the CONSUMER endpoint instead. But shouldn't it be that the ME references the CONSUMER endpoint of the caller (the service that created and sent the message originally) and the MIRROR references the PROVIDER endpoint of the called service (the service that received the original message) which most likely are not the same SU. This would mean that the addressing parts (service name, endpoint, interface name) must be removed from the packet and kept separate from the ME and its MIRROR. We might also need to swap the ME and MIRROR so that the ME is pointing to the PROVIDER and the MIRROR pointing to the CONSUMER. This means that the DC will use the ME instead of the MIRROR to send the ME and NMR or the receiving DC must swap the ME / MIRROR so that the Provider Endpoint receives the MIRROR which is subsequently pointing back to the calling service. Let me know what you think? Thanks - Andy On Oct 17, 2007, at 9:11 AM, Andreas Schaefer (2) wrote: Hi Guillaume I tried something new using the SCRIPT as the provider service rather than another BEAN. Now I think I see a little bit more what is going wrong. What is happening is that the response is handled by the BeanComponent (which is good) but because it is using the MIRROR member to which it sends the response to it fails because of an unknown request (it should work because I fix that issue locally). From my understanding I think the message is properly sent back to the correct BC/SE, in this case the Bean Component, but because it uses the MIRROR as the address it sends it to the wrong SU, which in this case is the SCRIPT SU which is not even a BEAN. It seems to me that the MIRROR is pointing to the consumer endpoint of the provider SU rather than the consumer SU. That is my log output: [Notes Andy]: Here I send the InOut Message to he Provider: 2007-10-17 08:51:53,515 [58-0:0-thread-1] INFO ScriptInOutControllerBean - onMessageExchange() send new ME: InOut[ id: ID:10.250.1.197-115aea91258-2:0 status: Active role: consumer service: {urn:scout}script-receiver-service operation: IdontCare: 0 in: ?xml version=1.0 encoding=UTF-8? receivertitleDontCareEvenMore/titleindex0/index/receiver ] 2007-10-17 08:51:53,515 [58-0:0-thread-1] DEBUG BeanComponent - Created correlation id: ID: 10.250.1.197-115aea91258-2:0 2007-10-17 08:51:53,515 [58-0:0-thread-1] DEBUG DeliveryChannelImpl- Send ID: 10.250.1.197-115aea91258-2:0 in DeliveryChannel{ID: 10.250.1.197-115aea91258-0:0} [Notes Andy]: AS-LOG are log statements I added to Smx 2007-10-17 08:51:53,515 [58-0:0-thread-1] INFO DeliveryChannelImpl- AS-LOG, doSend(), ME: InOut[ id: ID:10.250.1.197-115aea91258-2:0 status: Active role: consumer service: {urn:scout}script-receiver-service operation: IdontCare: 0 in: ?xml version=1.0 encoding=UTF-8? receivertitleDontCareEvenMore/titleindex0/index/receiver ] 2007-10-17 08:51:53,516 [58-0:0-thread-1] INFO DeliveryChannelImpl- AS-LOG, doSend(), send exchange to MIRROR: InOut[ id: ID:10.250.1.197-115aea91258-2:0 status: Active role: provider service: {urn:scout}script-receiver-service operation: IdontCare: 0 in: ?xml version=1.0 encoding=UTF-8? receivertitleDontCareEvenMore/titleindex0/index/receiver ] 2007-10-17 08:51:53,516 [58-0:0-thread-1] DEBUG SedaFlow - Called Flow send 2007-10-17 08:51:53,518 [58-0:1-thread-1] DEBUG SedaQueue - [EMAIL PROTECTED] dequeued exchange: InOut[ id: ID:10.250.1.197-115aea91258-2:0 status: Active role: provider service: {urn:scout}script-receiver-service endpoint: in-out-receiver operation: IdontCare: 0 in: ?xml version=1.0 encoding=UTF-8? receivertitleDontCareEvenMore/titleindex0/index/receiver ] 2007-10-17 08:51:53,518
ServiceMix Bean issues with send()
Hi I try to figure out what is going wrong with the ServiceMix Bean component when used with an asynchronous message exchange (send()). There is a good chance to I do not understand how the message exchange should work. This is what I tried: - Bean SU 1 sends an In-Out ME to another Bean SU 2 with send() on the Delivery Channel - B SU 2 handles the message and puts in an Out normalized message and then sends the ME back with send() on its Delivery Channel What I see is that the Delivery Channel is sending the Mirror ME which is nearly the same but just has the opposite role (here consumer). This means that the message is sent back to the Consumer Bean Endpoint because that is the address set in the Mirror ME. Is my assumption right that when a message is read from the NMR that it goes through the Provider endpoint and when the message is sent back that it then goes first through the Consumer endpoint of the same service or should it go to the Consumer endpoint of the calling service? If the consumer endpoint of he SAME service is called then who is responsible on sending the message back to the calling service (B SU 1) and is there a way to do this automatically (meaning with having to code anything in the Bean SUs)? Thank you Andreas Schaefer CEO of Madplanet.com Inc. [EMAIL PROTECTED] PGP.sig Description: This is a digitally signed message part
Re: ServiceMix Bean issues with send()
On 10/16/07, Andreas Schaefer (2) [EMAIL PROTECTED] wrote: Hi I try to figure out what is going wrong with the ServiceMix Bean component when used with an asynchronous message exchange (send()). There is a good chance to I do not understand how the message exchange should work. This is what I tried: - Bean SU 1 sends an In-Out ME to another Bean SU 2 with send() on the Delivery Channel - B SU 2 handles the message and puts in an Out normalized message and then sends the ME back with send() on its Delivery Channel What I see is that the Delivery Channel is sending the Mirror ME which is nearly the same but just has the opposite role (here consumer). This means that the message is sent back to the Consumer Bean Endpoint because that is the address set in the Mirror ME. Yeah. The thing is that in JBI, an exchange is sent from a component to an endpoint. In an InOut mep, the provider will send the exchange with the out message inside, the nmr will route it to the consumer component, which will dispatch it to the consumer endpoint. The endpoint processes the response and need to send back the exchange with a DONE status. The mirror stuff is used internally. Is my assumption right that when a message is read from the NMR that it goes through the Provider endpoint and when the message is sent back that it then goes first through the Consumer endpoint of the same service or should it go to the Consumer endpoint of the calling service? I don't understand what is the difference you make between Consumer endpoint of the same service and Consumer endpoint of the calling service ? Do you mean the POJO instance ? If the consumer endpoint of he SAME service is called then who is responsible on sending the message back to the calling service (B SU 1) and is there a way to do this automatically (meaning with having to code anything in the Bean SUs)? If you don't implement MessageExchangeListener and you want to use InOut asynchronously, then you need to use the @Callback annotation and the Destination. Else, I think the problem is that the component does not track that a given endpoint acts as a consumer and send an exchange, so that it can not route it back to the endpoint. This would require wrapping the DeliveryChannel or simply overriding the sendConsumerExchange method from the component. All exchanges sent from endpoints could be tracked, but we still don't have any way to call the bean, unless it has a @Callback. Can you post your beans, because servicemix-bean has different ways of writing a bean, so... Thank you Andreas Schaefer CEO of Madplanet.com Inc. [EMAIL PROTECTED] -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
[jira] Assigned: (SM-957) Enhance servicemix-bean by providing a ServiceUnitAnalyzer
[ https://issues.apache.org/activemq/browse/SM-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet reassigned SM-957: -- Assignee: Adrian Co Enhance servicemix-bean by providing a ServiceUnitAnalyzer -- Key: SM-957 URL: https://issues.apache.org/activemq/browse/SM-957 Project: ServiceMix Issue Type: New Feature Components: servicemix-bean Affects Versions: 3.2 Environment: linux, normal pc Reporter: Eduardo Burgos Assignee: Adrian Co Priority: Minor Attachments: servicemix-bean-05232007-eburgos.diff Attached is a diff with the addition of a new BeanServiceUnitAnalyzer that I made. At this moment, it only works with endpoints of type bean:endpoint and it looks every endpoint's bean for their @ExchangeTarget's uri property. I had to copy the parse part from the URIResolver class, I couldn't directly use it because I don't have a ComponentContext or a MessageExchange at that moment, so you'll pretty much find duplicated code from URIResolver class :(. I tested it with my own endpoints and it worked well. I hope you like it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: servicemix-bean, ServiceUnitAnalyzer
Sorry, the week has been quite busy (I have just had my fifth child) ... On 5/31/07, Eduardo Burgos [EMAIL PROTECTED] wrote: any news? On 5/24/07, Guillaume Nodet [EMAIL PROTECTED] wrote: On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: JIRA for the custom serviceUnitAnalyzer in jbi-maven-plugin: https://issues.apache.org/activemq/browse/SM-956 JIRA for the BeanServiceUnitAnalyzer for the servicemix-bean component: https://issues.apache.org/activemq/browse/SM-957 Thanks ! I'll take a look at these asap. Regarding the BeanServiceUnitAnalyzer, I only implemented it for endpoints of type bean:endpoint (I just thought this would be the most common case). I generated the consumes by looking at the fields with @ExchangeTarget using reflection. Yeah, I guess this is the most common use cases. Please take a look. Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: No, I'm not thinking about removing the other way, it's just to have this as an option. About the custom service analyzer, for example, lets say we have a component that is not supported by this team and we have no possibility to access it's source code and I still need to build a service unit for it, currently there is no possibility for the jbi-maven-plugin to guess an analyzer for it, so I thought that if we had the option to define the analyzer class at service unit level it should do. Yeah, I was thinking about that too. Another example is what I need right now, I'm looking to develop a servicemix-bean SU and I couldn't find a ServiceUnitAnalyzer for that component. I couldn't have solved my problem in a standard way if I don't have access to this mailing list :) Agreed I have it set in my servicemix source and its ready for a diff and JIRA. Working on the BeanSUAnalyzer as we speak :) Cool, thx ! Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Sure, sounds good ! What kind of custom service analyser are thinking about ? Or is that for non servicemix components ? But I don't think we should remove the other way, which work well for servicemix components. Btw, such discussions about enhancing ServiceMix should really take place on the dev list, so please answer to the dev list if possible. On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: There is something else I would like to suggest. Let's say I have a service-unit artifact and my target component does not have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and how it uses the serviceUnitAnalyzer and I noticed that it either uses that jbi-services.xml file or looks up the target component for a serviceUnitAnalyzer class name. What if we also have a serviceUnitAnalyzerClass/serviceUnitAnalyzerClass declared in that service-unit artifact (not the component) where I can specify my desired serviceUnitAnalyzer for that SU. Example: project . artifactIdmyproject/artifactId packagingjbi-service-unit/packaging build plugins plugin groupIdorg.apache.servicemix.tooling /groupId artifactIdjbi-maven-plugin/artifactId version${servicemix-version}/version configuration serviceUnitAnalyzerClass org.test.jbi.bean.BeanServiceUnitAnalyzer /serviceUnitAnalyzerClass /configuration /plugin /plugins /build Notice that the serviceUnitAnalyzerClass is in the SU's configuration and not the component, this way the desired serviceUnitAnalyzer is not tied to the component but to the plugin's configuration (And also keeping the current approach). Then in the org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass add a String field called 'serviceUnitAnalyzerClass' and insert this where it finds the serviceUnitAnalyzer class: if (useServiceUnitAnalyzer.booleanValue()) { +if (serviceUnitAnalyzerClass!= null) +return serviceUnitAnalyzerClass; MavenProject project = getComponentProject(); Does this makes sense? Eduardo Burgos On 5/22/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah, it's missing. Feel free to attach one to a JIRA :-) On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote
Re: servicemix-bean, ServiceUnitAnalyzer
Wow, Congratulations :) Tell me when you have time. On 5/31/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Sorry, the week has been quite busy (I have just had my fifth child) ... On 5/31/07, Eduardo Burgos [EMAIL PROTECTED] wrote: any news? On 5/24/07, Guillaume Nodet [EMAIL PROTECTED] wrote: On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: JIRA for the custom serviceUnitAnalyzer in jbi-maven-plugin: https://issues.apache.org/activemq/browse/SM-956 JIRA for the BeanServiceUnitAnalyzer for the servicemix-bean component: https://issues.apache.org/activemq/browse/SM-957 Thanks ! I'll take a look at these asap. Regarding the BeanServiceUnitAnalyzer, I only implemented it for endpoints of type bean:endpoint (I just thought this would be the most common case). I generated the consumes by looking at the fields with @ExchangeTarget using reflection. Yeah, I guess this is the most common use cases. Please take a look. Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: No, I'm not thinking about removing the other way, it's just to have this as an option. About the custom service analyzer, for example, lets say we have a component that is not supported by this team and we have no possibility to access it's source code and I still need to build a service unit for it, currently there is no possibility for the jbi-maven-plugin to guess an analyzer for it, so I thought that if we had the option to define the analyzer class at service unit level it should do. Yeah, I was thinking about that too. Another example is what I need right now, I'm looking to develop a servicemix-bean SU and I couldn't find a ServiceUnitAnalyzer for that component. I couldn't have solved my problem in a standard way if I don't have access to this mailing list :) Agreed I have it set in my servicemix source and its ready for a diff and JIRA. Working on the BeanSUAnalyzer as we speak :) Cool, thx ! Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Sure, sounds good ! What kind of custom service analyser are thinking about ? Or is that for non servicemix components ? But I don't think we should remove the other way, which work well for servicemix components. Btw, such discussions about enhancing ServiceMix should really take place on the dev list, so please answer to the dev list if possible. On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: There is something else I would like to suggest. Let's say I have a service-unit artifact and my target component does not have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and how it uses the serviceUnitAnalyzer and I noticed that it either uses that jbi-services.xml file or looks up the target component for a serviceUnitAnalyzer class name. What if we also have a serviceUnitAnalyzerClass/serviceUnitAnalyzerClass declared in that service-unit artifact (not the component) where I can specify my desired serviceUnitAnalyzer for that SU. Example: project . artifactIdmyproject/artifactId packagingjbi-service-unit/packaging build plugins plugin groupIdorg.apache.servicemix.tooling /groupId artifactIdjbi-maven-plugin/artifactId version${servicemix-version}/version configuration serviceUnitAnalyzerClass org.test.jbi.bean.BeanServiceUnitAnalyzer /serviceUnitAnalyzerClass /configuration /plugin /plugins /build Notice that the serviceUnitAnalyzerClass is in the SU's configuration and not the component, this way the desired serviceUnitAnalyzer is not tied to the component but to the plugin's configuration (And also keeping the current approach). Then in the org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass add a String field called 'serviceUnitAnalyzerClass' and insert this where it finds the serviceUnitAnalyzer class: if (useServiceUnitAnalyzer.booleanValue()) { +if (serviceUnitAnalyzerClass!= null) +return serviceUnitAnalyzerClass; MavenProject project = getComponentProject(); Does this makes sense
Re: servicemix-bean, ServiceUnitAnalyzer
any news? On 5/24/07, Guillaume Nodet [EMAIL PROTECTED] wrote: On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: JIRA for the custom serviceUnitAnalyzer in jbi-maven-plugin: https://issues.apache.org/activemq/browse/SM-956 JIRA for the BeanServiceUnitAnalyzer for the servicemix-bean component: https://issues.apache.org/activemq/browse/SM-957 Thanks ! I'll take a look at these asap. Regarding the BeanServiceUnitAnalyzer, I only implemented it for endpoints of type bean:endpoint (I just thought this would be the most common case). I generated the consumes by looking at the fields with @ExchangeTarget using reflection. Yeah, I guess this is the most common use cases. Please take a look. Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: No, I'm not thinking about removing the other way, it's just to have this as an option. About the custom service analyzer, for example, lets say we have a component that is not supported by this team and we have no possibility to access it's source code and I still need to build a service unit for it, currently there is no possibility for the jbi-maven-plugin to guess an analyzer for it, so I thought that if we had the option to define the analyzer class at service unit level it should do. Yeah, I was thinking about that too. Another example is what I need right now, I'm looking to develop a servicemix-bean SU and I couldn't find a ServiceUnitAnalyzer for that component. I couldn't have solved my problem in a standard way if I don't have access to this mailing list :) Agreed I have it set in my servicemix source and its ready for a diff and JIRA. Working on the BeanSUAnalyzer as we speak :) Cool, thx ! Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Sure, sounds good ! What kind of custom service analyser are thinking about ? Or is that for non servicemix components ? But I don't think we should remove the other way, which work well for servicemix components. Btw, such discussions about enhancing ServiceMix should really take place on the dev list, so please answer to the dev list if possible. On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: There is something else I would like to suggest. Let's say I have a service-unit artifact and my target component does not have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and how it uses the serviceUnitAnalyzer and I noticed that it either uses that jbi-services.xml file or looks up the target component for a serviceUnitAnalyzer class name. What if we also have a serviceUnitAnalyzerClass/serviceUnitAnalyzerClass declared in that service-unit artifact (not the component) where I can specify my desired serviceUnitAnalyzer for that SU. Example: project . artifactIdmyproject/artifactId packagingjbi-service-unit/packaging build plugins plugin groupIdorg.apache.servicemix.tooling/groupId artifactIdjbi-maven-plugin/artifactId version${servicemix-version}/version configuration serviceUnitAnalyzerClass org.test.jbi.bean.BeanServiceUnitAnalyzer /serviceUnitAnalyzerClass /configuration /plugin /plugins /build Notice that the serviceUnitAnalyzerClass is in the SU's configuration and not the component, this way the desired serviceUnitAnalyzer is not tied to the component but to the plugin's configuration (And also keeping the current approach). Then in the org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass add a String field called 'serviceUnitAnalyzerClass' and insert this where it finds the serviceUnitAnalyzer class: if (useServiceUnitAnalyzer.booleanValue()) { +if (serviceUnitAnalyzerClass!= null) +return serviceUnitAnalyzerClass; MavenProject project = getComponentProject(); Does this makes sense? Eduardo Burgos On 5/22/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah, it's missing. Feel free to attach one to a JIRA :-) On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Is there a ServiceUnitAnalyzer for this component? if not, can I provide one? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com
Re: servicemix-bean, BeanInfo, how to set operations
Implementing MessageExchangeListener will lose the beauty of servicemix-bean :(, but I understand you may be out of time and stuff, so I will just do that. On 5/25/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Why not implementing MessageExhcangeListener ? I know it does not solve the operation problem, but it is the easiest work around at the moment. On 5/25/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Ok, that's exactly my point. Now look at this, same class, lines 68-76 public void introspect() { introspect(getType()); if (operations.size() == 1) { CollectionMethodInfo methodInfos = operations.values(); for (MethodInfo methodInfo : methodInfos) { defaultExpression = methodInfo; } } } According to this, only if operations.size() == 1 I will get a defaultExpression, this involves that my bean has one and only one method. This restricts a lot when it comes to receiving a message with a null operation, my bean can't have more than one method. Can we fix this somehow? maybe having the first Operation() attribute with no name to be the default one? To be more concrete, I'm trying to receive a message from a Quartz endpoint and I get no oportunity to specify an operation name, not even with a Marshaler. This way, having a defaultOperation is almost impossible. Any Comments? Eduardo Burgos On 5/25/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah. It sounds like there is no way to hide methods, so all public methods are exposed as operations :-( On 5/25/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Hi, I've been looking at servicemix-bean and I noticed this in org.apache.servicemix.bean.support.BeanInfo line 103 in the following method protected void introspect(Class clazz, Method method) I'm quoting lines 121-130 121- // now lets add the method to the repository String opName = method.getName(); if (method.getAnnotation(Operation.class) != null) { String name = method.getAnnotation(Operation.class ).name(); if (name != null name.length() 0) { opName = name; } } Expression parametersExpression = createMethodParametersExpression(parameterExpressions); 130-operations.put(opName, new MethodInfo(clazz, method, parametersExpression)); According to this, every method of my bean is an operation whose name is defined at least by the method's name. Is this intended? I thought that only the methods that had the Operation attribute would be listed as operations. For example, I have a setSessionTimeout method that I wouldn't want it to be an operation :). Any ideas? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
servicemix-bean, BeanInfo, how to set operations
Hi, I've been looking at servicemix-bean and I noticed this in org.apache.servicemix.bean.support.BeanInfo line 103 in the following method protected void introspect(Class clazz, Method method) I'm quoting lines 121-130 121- // now lets add the method to the repository String opName = method.getName(); if (method.getAnnotation(Operation.class) != null) { String name = method.getAnnotation(Operation.class).name(); if (name != null name.length() 0) { opName = name; } } Expression parametersExpression = createMethodParametersExpression(parameterExpressions); 130-operations.put(opName, new MethodInfo(clazz, method, parametersExpression)); According to this, every method of my bean is an operation whose name is defined at least by the method's name. Is this intended? I thought that only the methods that had the Operation attribute would be listed as operations. For example, I have a setSessionTimeout method that I wouldn't want it to be an operation :). Any ideas? Eduardo Burgos
Re: servicemix-bean, BeanInfo, how to set operations
Yeah. It sounds like there is no way to hide methods, so all public methods are exposed as operations :-( On 5/25/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Hi, I've been looking at servicemix-bean and I noticed this in org.apache.servicemix.bean.support.BeanInfo line 103 in the following method protected void introspect(Class clazz, Method method) I'm quoting lines 121-130 121- // now lets add the method to the repository String opName = method.getName(); if (method.getAnnotation(Operation.class) != null) { String name = method.getAnnotation(Operation.class ).name(); if (name != null name.length() 0) { opName = name; } } Expression parametersExpression = createMethodParametersExpression(parameterExpressions); 130-operations.put(opName, new MethodInfo(clazz, method, parametersExpression)); According to this, every method of my bean is an operation whose name is defined at least by the method's name. Is this intended? I thought that only the methods that had the Operation attribute would be listed as operations. For example, I have a setSessionTimeout method that I wouldn't want it to be an operation :). Any ideas? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
Re: servicemix-bean, BeanInfo, how to set operations
Ok, that's exactly my point. Now look at this, same class, lines 68-76 public void introspect() { introspect(getType()); if (operations.size() == 1) { CollectionMethodInfo methodInfos = operations.values(); for (MethodInfo methodInfo : methodInfos) { defaultExpression = methodInfo; } } } According to this, only if operations.size() == 1 I will get a defaultExpression, this involves that my bean has one and only one method. This restricts a lot when it comes to receiving a message with a null operation, my bean can't have more than one method. Can we fix this somehow? maybe having the first Operation() attribute with no name to be the default one? To be more concrete, I'm trying to receive a message from a Quartz endpoint and I get no oportunity to specify an operation name, not even with a Marshaler. This way, having a defaultOperation is almost impossible. Any Comments? Eduardo Burgos On 5/25/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah. It sounds like there is no way to hide methods, so all public methods are exposed as operations :-( On 5/25/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Hi, I've been looking at servicemix-bean and I noticed this in org.apache.servicemix.bean.support.BeanInfo line 103 in the following method protected void introspect(Class clazz, Method method) I'm quoting lines 121-130 121- // now lets add the method to the repository String opName = method.getName(); if (method.getAnnotation(Operation.class) != null) { String name = method.getAnnotation(Operation.class ).name(); if (name != null name.length() 0) { opName = name; } } Expression parametersExpression = createMethodParametersExpression(parameterExpressions); 130-operations.put(opName, new MethodInfo(clazz, method, parametersExpression)); According to this, every method of my bean is an operation whose name is defined at least by the method's name. Is this intended? I thought that only the methods that had the Operation attribute would be listed as operations. For example, I have a setSessionTimeout method that I wouldn't want it to be an operation :). Any ideas? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
Re: servicemix-bean, BeanInfo, how to set operations
Why not implementing MessageExhcangeListener ? I know it does not solve the operation problem, but it is the easiest work around at the moment. On 5/25/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Ok, that's exactly my point. Now look at this, same class, lines 68-76 public void introspect() { introspect(getType()); if (operations.size() == 1) { CollectionMethodInfo methodInfos = operations.values(); for (MethodInfo methodInfo : methodInfos) { defaultExpression = methodInfo; } } } According to this, only if operations.size() == 1 I will get a defaultExpression, this involves that my bean has one and only one method. This restricts a lot when it comes to receiving a message with a null operation, my bean can't have more than one method. Can we fix this somehow? maybe having the first Operation() attribute with no name to be the default one? To be more concrete, I'm trying to receive a message from a Quartz endpoint and I get no oportunity to specify an operation name, not even with a Marshaler. This way, having a defaultOperation is almost impossible. Any Comments? Eduardo Burgos On 5/25/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah. It sounds like there is no way to hide methods, so all public methods are exposed as operations :-( On 5/25/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Hi, I've been looking at servicemix-bean and I noticed this in org.apache.servicemix.bean.support.BeanInfo line 103 in the following method protected void introspect(Class clazz, Method method) I'm quoting lines 121-130 121- // now lets add the method to the repository String opName = method.getName(); if (method.getAnnotation(Operation.class) != null) { String name = method.getAnnotation(Operation.class ).name(); if (name != null name.length() 0) { opName = name; } } Expression parametersExpression = createMethodParametersExpression(parameterExpressions); 130-operations.put(opName, new MethodInfo(clazz, method, parametersExpression)); According to this, every method of my bean is an operation whose name is defined at least by the method's name. Is this intended? I thought that only the methods that had the Operation attribute would be listed as operations. For example, I have a setSessionTimeout method that I wouldn't want it to be an operation :). Any ideas? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
[jira] Created: (SM-957) Enhance servicemix-bean by providing a ServiceUnitAnalyzer
Enhance servicemix-bean by providing a ServiceUnitAnalyzer -- Key: SM-957 URL: https://issues.apache.org/activemq/browse/SM-957 Project: ServiceMix Issue Type: New Feature Components: servicemix-bean Affects Versions: 3.2 Environment: linux, normal pc Reporter: Eduardo Burgos Priority: Minor Attachments: servicemix-bean-05232007-eburgos.diff Attached is a diff with the addition of a new BeanServiceUnitAnalyzer that I made. At this moment, it only works with endpoints of type bean:endpoint and it looks every endpoint's bean for their @ExchangeTarget's uri property. I had to copy the parse part from the URIResolver class, I couldn't directly use it because I don't have a ComponentContext or a MessageExchange at that moment, so you'll pretty much find duplicated code from URIResolver class :(. I tested it with my own endpoints and it worked well. I hope you like it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: servicemix-bean, ServiceUnitAnalyzer
JIRA for the custom serviceUnitAnalyzer in jbi-maven-plugin: https://issues.apache.org/activemq/browse/SM-956 JIRA for the BeanServiceUnitAnalyzer for the servicemix-bean component: https://issues.apache.org/activemq/browse/SM-957 Regarding the BeanServiceUnitAnalyzer, I only implemented it for endpoints of type bean:endpoint (I just thought this would be the most common case). I generated the consumes by looking at the fields with @ExchangeTarget using reflection. Please take a look. Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: No, I'm not thinking about removing the other way, it's just to have this as an option. About the custom service analyzer, for example, lets say we have a component that is not supported by this team and we have no possibility to access it's source code and I still need to build a service unit for it, currently there is no possibility for the jbi-maven-plugin to guess an analyzer for it, so I thought that if we had the option to define the analyzer class at service unit level it should do. Yeah, I was thinking about that too. Another example is what I need right now, I'm looking to develop a servicemix-bean SU and I couldn't find a ServiceUnitAnalyzer for that component. I couldn't have solved my problem in a standard way if I don't have access to this mailing list :) Agreed I have it set in my servicemix source and its ready for a diff and JIRA. Working on the BeanSUAnalyzer as we speak :) Cool, thx ! Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Sure, sounds good ! What kind of custom service analyser are thinking about ? Or is that for non servicemix components ? But I don't think we should remove the other way, which work well for servicemix components. Btw, such discussions about enhancing ServiceMix should really take place on the dev list, so please answer to the dev list if possible. On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: There is something else I would like to suggest. Let's say I have a service-unit artifact and my target component does not have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and how it uses the serviceUnitAnalyzer and I noticed that it either uses that jbi-services.xml file or looks up the target component for a serviceUnitAnalyzer class name. What if we also have a serviceUnitAnalyzerClass/serviceUnitAnalyzerClass declared in that service-unit artifact (not the component) where I can specify my desired serviceUnitAnalyzer for that SU. Example: project . artifactIdmyproject/artifactId packagingjbi-service-unit/packaging build plugins plugin groupIdorg.apache.servicemix.tooling/groupId artifactIdjbi-maven-plugin/artifactId version${servicemix-version}/version configuration serviceUnitAnalyzerClassorg.test.jbi.bean.BeanServiceUnitAnalyzer /serviceUnitAnalyzerClass /configuration /plugin /plugins /build Notice that the serviceUnitAnalyzerClass is in the SU's configuration and not the component, this way the desired serviceUnitAnalyzer is not tied to the component but to the plugin's configuration (And also keeping the current approach). Then in the org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass add a String field called 'serviceUnitAnalyzerClass' and insert this where it finds the serviceUnitAnalyzer class: if (useServiceUnitAnalyzer.booleanValue()) { +if (serviceUnitAnalyzerClass!= null) +return serviceUnitAnalyzerClass; MavenProject project = getComponentProject(); Does this makes sense? Eduardo Burgos On 5/22/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah, it's missing. Feel free to attach one to a JIRA :-) On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Is there a ServiceUnitAnalyzer for this component? if not, can I provide one? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
Re: servicemix-bean, ServiceUnitAnalyzer
Sure, sounds good ! What kind of custom service analyser are thinking about ? Or is that for non servicemix components ? But I don't think we should remove the other way, which work well for servicemix components. Btw, such discussions about enhancing ServiceMix should really take place on the dev list, so please answer to the dev list if possible. On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: There is something else I would like to suggest. Let's say I have a service-unit artifact and my target component does not have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and how it uses the serviceUnitAnalyzer and I noticed that it either uses that jbi-services.xml file or looks up the target component for a serviceUnitAnalyzer class name. What if we also have a serviceUnitAnalyzerClass/serviceUnitAnalyzerClass declared in that service-unit artifact (not the component) where I can specify my desired serviceUnitAnalyzer for that SU. Example: project . artifactIdmyproject/artifactId packagingjbi-service-unit/packaging build plugins plugin groupIdorg.apache.servicemix.tooling/groupId artifactIdjbi-maven-plugin/artifactId version${servicemix-version}/version configuration serviceUnitAnalyzerClassorg.test.jbi.bean.BeanServiceUnitAnalyzer /serviceUnitAnalyzerClass /configuration /plugin /plugins /build Notice that the serviceUnitAnalyzerClass is in the SU's configuration and not the component, this way the desired serviceUnitAnalyzer is not tied to the component but to the plugin's configuration (And also keeping the current approach). Then in the org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass add a String field called 'serviceUnitAnalyzerClass' and insert this where it finds the serviceUnitAnalyzer class: if (useServiceUnitAnalyzer.booleanValue()) { +if (serviceUnitAnalyzerClass!= null) +return serviceUnitAnalyzerClass; MavenProject project = getComponentProject(); Does this makes sense? Eduardo Burgos On 5/22/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah, it's missing. Feel free to attach one to a JIRA :-) On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Is there a ServiceUnitAnalyzer for this component? if not, can I provide one? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
Re: servicemix-bean, ServiceUnitAnalyzer
No, I'm not thinking about removing the other way, it's just to have this as an option. About the custom service analyzer, for example, lets say we have a component that is not supported by this team and we have no possibility to access it's source code and I still need to build a service unit for it, currently there is no possibility for the jbi-maven-plugin to guess an analyzer for it, so I thought that if we had the option to define the analyzer class at service unit level it should do. Another example is what I need right now, I'm looking to develop a servicemix-bean SU and I couldn't find a ServiceUnitAnalyzer for that component. I couldn't have solved my problem in a standard way if I don't have access to this mailing list :) I have it set in my servicemix source and its ready for a diff and JIRA. Working on the BeanSUAnalyzer as we speak :) Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Sure, sounds good ! What kind of custom service analyser are thinking about ? Or is that for non servicemix components ? But I don't think we should remove the other way, which work well for servicemix components. Btw, such discussions about enhancing ServiceMix should really take place on the dev list, so please answer to the dev list if possible. On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: There is something else I would like to suggest. Let's say I have a service-unit artifact and my target component does not have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and how it uses the serviceUnitAnalyzer and I noticed that it either uses that jbi-services.xml file or looks up the target component for a serviceUnitAnalyzer class name. What if we also have a serviceUnitAnalyzerClass/serviceUnitAnalyzerClass declared in that service-unit artifact (not the component) where I can specify my desired serviceUnitAnalyzer for that SU. Example: project . artifactIdmyproject/artifactId packagingjbi-service-unit/packaging build plugins plugin groupIdorg.apache.servicemix.tooling/groupId artifactIdjbi-maven-plugin/artifactId version${servicemix-version}/version configuration serviceUnitAnalyzerClassorg.test.jbi.bean.BeanServiceUnitAnalyzer /serviceUnitAnalyzerClass /configuration /plugin /plugins /build Notice that the serviceUnitAnalyzerClass is in the SU's configuration and not the component, this way the desired serviceUnitAnalyzer is not tied to the component but to the plugin's configuration (And also keeping the current approach). Then in the org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass add a String field called 'serviceUnitAnalyzerClass' and insert this where it finds the serviceUnitAnalyzer class: if (useServiceUnitAnalyzer.booleanValue()) { +if (serviceUnitAnalyzerClass!= null) +return serviceUnitAnalyzerClass; MavenProject project = getComponentProject(); Does this makes sense? Eduardo Burgos On 5/22/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah, it's missing. Feel free to attach one to a JIRA :-) On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Is there a ServiceUnitAnalyzer for this component? if not, can I provide one? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
Re: servicemix-bean, ServiceUnitAnalyzer
On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: No, I'm not thinking about removing the other way, it's just to have this as an option. About the custom service analyzer, for example, lets say we have a component that is not supported by this team and we have no possibility to access it's source code and I still need to build a service unit for it, currently there is no possibility for the jbi-maven-plugin to guess an analyzer for it, so I thought that if we had the option to define the analyzer class at service unit level it should do. Yeah, I was thinking about that too. Another example is what I need right now, I'm looking to develop a servicemix-bean SU and I couldn't find a ServiceUnitAnalyzer for that component. I couldn't have solved my problem in a standard way if I don't have access to this mailing list :) Agreed I have it set in my servicemix source and its ready for a diff and JIRA. Working on the BeanSUAnalyzer as we speak :) Cool, thx ! Eduardo Burgos On 5/23/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Sure, sounds good ! What kind of custom service analyser are thinking about ? Or is that for non servicemix components ? But I don't think we should remove the other way, which work well for servicemix components. Btw, such discussions about enhancing ServiceMix should really take place on the dev list, so please answer to the dev list if possible. On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: There is something else I would like to suggest. Let's say I have a service-unit artifact and my target component does not have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and how it uses the serviceUnitAnalyzer and I noticed that it either uses that jbi-services.xml file or looks up the target component for a serviceUnitAnalyzer class name. What if we also have a serviceUnitAnalyzerClass/serviceUnitAnalyzerClass declared in that service-unit artifact (not the component) where I can specify my desired serviceUnitAnalyzer for that SU. Example: project . artifactIdmyproject/artifactId packagingjbi-service-unit/packaging build plugins plugin groupIdorg.apache.servicemix.tooling/groupId artifactIdjbi-maven-plugin/artifactId version${servicemix-version}/version configuration serviceUnitAnalyzerClassorg.test.jbi.bean.BeanServiceUnitAnalyzer /serviceUnitAnalyzerClass /configuration /plugin /plugins /build Notice that the serviceUnitAnalyzerClass is in the SU's configuration and not the component, this way the desired serviceUnitAnalyzer is not tied to the component but to the plugin's configuration (And also keeping the current approach). Then in the org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass add a String field called 'serviceUnitAnalyzerClass' and insert this where it finds the serviceUnitAnalyzer class: if (useServiceUnitAnalyzer.booleanValue()) { +if (serviceUnitAnalyzerClass!= null) +return serviceUnitAnalyzerClass; MavenProject project = getComponentProject(); Does this makes sense? Eduardo Burgos On 5/22/07, Guillaume Nodet [EMAIL PROTECTED] wrote: Yeah, it's missing. Feel free to attach one to a JIRA :-) On 5/23/07, Eduardo Burgos [EMAIL PROTECTED] wrote: Is there a ServiceUnitAnalyzer for this component? if not, can I provide one? Eduardo Burgos -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
[jira] Created: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] java.lang.IllegalStateException: Receiving unknown consumer exchange: InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] at org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:268) at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) 08:11:11,845 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 60 | Error setting exchange status to ERROR javax.jbi.messaging.MessagingException: illegal call to send / sendSync at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:372) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:419) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:58
[jira] Commented: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
[ https://issues.apache.org/activemq/browse/SM-944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39096 ] Guillaume Nodet commented on SM-944: Though servicemix-bean should be enhanced to support sending InOnly exchanges, a workaround is to use sendSync instead of send. IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] java.lang.IllegalStateException: Receiving unknown consumer exchange: InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] at org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:268) at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) 08:11:11,845 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 60 | Error setting exchange status to ERROR javax.jbi.messaging.MessagingException: illegal call to send / sendSync
[jira] Updated: (SM-944) IllegalStateException between servicemix-jms and servicemix-bean
[ https://issues.apache.org/activemq/browse/SM-944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet updated SM-944: --- Fix Version/s: 3.2 3.1.2 IllegalStateException between servicemix-jms and servicemix-bean Key: SM-944 URL: https://issues.apache.org/activemq/browse/SM-944 Project: ServiceMix Issue Type: Bug Components: servicemix-bean Affects Versions: 3.1.1 Environment: Linux Redhat 4 Reporter: Noseda Anne Fix For: 3.1.2, 3.2 08:11:11,840 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 48 | Error processing exchange InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] java.lang.IllegalStateException: Receiving unknown consumer exchange: InOnly[ id: ID:127.0.0.1-111e98f3e46-5:3 status: Done role: consumer service: {http://www.etnic.be/janus}JmsIn endpoint: endpoint in: ?xml version=1.0 encoding=UTF-8?janusRequest xmlns=http://www.etnic.be/janus;contentmetadatamessageIdc5b55899-e985-11db-abd1-9dbf85725783/messageIdtohttp://www.etnic.be/janus/OrchestrationAsync/AsyncOrchestration/tofromhttp://www.etnic.be/simulate/client/frommodeasync/modeiterationNumber0/iterationNumbercnWSJanusTEST_LDU1/cnns2:authorization xmlns:ns2=http://www.etnic.be/janus;userId/nom/prenom/profilesprofilecodecfwb.enseignement.fase.poxx.vwfrom/codeorganismesorganismetypens_po_id/typevaleur24/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.fase.etabxx.vwfrom/codeorganismesorganismetypens_etab_id/typevaleur196/valeur/organisme/organismes/profileprofilecodecfwb.enseignement.janus.test.wss/codeorganismes//profile/profiles/ns2:authorization/metadatadatarequestFaseRequete xmlns=http://www.etnic.be/janus/fase; Organisation TypePO/Type Identifiant100/Identifiant /Organisation DmdFICHE/Dmd /FaseRequete/request/data/content/janusRequest ] at org.apache.servicemix.bean.BeanEndpoint.onConsumerExchange(BeanEndpoint.java:268) at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:198) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) 08:11:11,845 | ERROR | pool-flow.seda.servicemix-jms-thread-2 | BeanComponent | ervicemix.common.BaseLifeCycle 60 | Error setting exchange status to ERROR javax.jbi.messaging.MessagingException: illegal call to send / sendSync at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571
[jira] Created: (SM-878) servicemix-bean is not include in the distribution
servicemix-bean is not include in the distribution -- Key: SM-878 URL: https://issues.apache.org/activemq/browse/SM-878 Project: ServiceMix Issue Type: Bug Components: servicemix-assembly Affects Versions: 3.1 Reporter: Guillaume Nodet Fix For: 3.1.1, 3.2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SM-878) servicemix-bean is not include in the distribution
[ https://issues.apache.org/activemq/browse/SM-878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved SM-878. Resolution: Fixed Assignee: Guillaume Nodet $ svn commit -m SM-878 include servicemix-bean in the distribution pom.xml distributions/apache-servicemix/pom.xml Sendingdistributions/apache-servicemix/pom.xml Sendingpom.xml Transmitting file data .. Committed revision 517257. $ svn commit -m SM-878 include servicemix-bean in the distribution pom.xml distributions/apache-servicemix/pom.xml Sendingdistributions/apache-servicemix/pom.xml Sendingpom.xml Transmitting file data .. Committed revision 517259. servicemix-bean is not include in the distribution -- Key: SM-878 URL: https://issues.apache.org/activemq/browse/SM-878 Project: ServiceMix Issue Type: Bug Components: servicemix-assembly Affects Versions: 3.1 Reporter: Guillaume Nodet Assigned To: Guillaume Nodet Fix For: 3.1.1, 3.2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Servicemix-Bean
I've been going over the servicemix-bean docs and as they are written at the moment, they seem to imply that most of the clever functionality can only be used in a static configuration. Is this actually the case or just an artifact of the way the documentation is structured? -- Terry
Re: Servicemix-Bean
On 3/7/07, Terry Cox [EMAIL PROTECTED] wrote: I've been going over the servicemix-bean docs and as they are written at the moment, they seem to imply that most of the clever functionality can only be used in a static configuration. Is this actually the case or just an artifact of the way the documentation is structured? There's nothing to stop folks using things dynamically I guess. Though part of the beauty of servicemix-bean is being able to browse the classpath at deployment time and find the POJOs to be deployed - rather like EJB3. -- James --- http://radio.weblogs.com/0112098/
Re: Servicemix-Bean
I'm going to write some tests to see how well things interoperate within the types of deployment scenarios I would expect to deal with on a large project. I think there is scope for some streamlining in the way projects can be developed and deployed quickly. -- Terry Cox Meta-Concepts Ltd
Re: Servicemix-Bean
On 3/7/07, Terry Cox [EMAIL PROTECTED] wrote: I'm going to write some tests to see how well things interoperate within the types of deployment scenarios I would expect to deal with on a large project. Great! I think there is scope for some streamlining in the way projects can be developed and deployed quickly. Agreed! -- James --- http://radio.weblogs.com/0112098/
Re: alternative to Jexl for expression language in servicemix-bean
Juel looks good. I have used jexl by default, so I would be happy to change to a better language. On 10/21/06, James Strachan [EMAIL PROTECTED] wrote: Saw this... http://juel.sourceforge.net/ it implements javax.el together with allowing method invocations as well as being fast - so wondered if it'd be a good alternative to Jexl? -- James --- http://radio.weblogs.com/0112098/ -- Cheers, Guillaume Nodet
Re: servicemix-bean
On 10/13/06, Guillaume Nodet [EMAIL PROTECTED] wrote: I have checked in some new code in servicemix-bean to be able to handle InOut exchanges and acting as a consumer. Sounds cool! BTW I've also added the ability for the BeanComponent to auto-discover POJOs on the classpath by the user specifying package names to search through, then any bean with an @Endpoint annotation will be auto-exposed. We can use the same technique to auto-expose regular JSR 181 POJOs with servicemix-jsr181 too. However there are a few things that do not work yet and some things I did not find a clean way to handle. We can now inject several stuff using @Resource annotation (not yet JNDI references), mainly a ComponentContext and a DeliveryChannel. @PostConstruct is also supported, Great! but I think we need to have scoped beans and create new beans for each request received (or maybe pool them). Agreed. If we are creating and injecting POJOs each time, there's really no need to pool (as we can just inject anything which needs to be pooled, like JDBC/JMS connections et al) There is a Callback annotation which has a condition expression evaluated using jexl each time an consumer exchange is received (i.e. a response to an InOut or a DONE status of an InOnly exchange that the bean has created and sent). The condition is evaluated using jexl. But we need to find a way to not call the same condition several times (maybe keep the old evaluation result and only call the callback when the value changes from false to true). Last, I haven't coded yet how to return the response when using an InOut request. And we also need a way to receive / throw faults. Yeah. Was thinking, if the method returns an object value, we use some kinda marshaller (which could be specified explicitly via an annotation or we could use smart defaults) - to turn it into a message body. -- James --- http://radio.weblogs.com/0112098/
Re: servicemix-bean
On 10/20/06, James Strachan [EMAIL PROTECTED] wrote: On 10/13/06, Guillaume Nodet [EMAIL PROTECTED] wrote: I have checked in some new code in servicemix-bean to be able to handle InOut exchanges and acting as a consumer. Sounds cool! BTW I've also added the ability for the BeanComponent to auto-discover POJOs on the classpath by the user specifying package names to search through, then any bean with an @Endpoint annotation will be auto-exposed. We can use the same technique to auto-expose regular JSR 181 POJOs with servicemix-jsr181 too. Agreed, and we could also inject stuff using annotations (jndi resources, proxies, jbi context, etc ...). We may also want to handle transaction annotations. Still not sure if we should reuse Pitchfork or not ... need to try defining a new scope bean and see how it goes... However there are a few things that do not work yet and some things I did not find a clean way to handle. We can now inject several stuff using @Resource annotation (not yet JNDI references), mainly a ComponentContext and a DeliveryChannel. @PostConstruct is also supported, Great! but I think we need to have scoped beans and create new beans for each request received (or maybe pool them). Agreed. If we are creating and injecting POJOs each time, there's really no need to pool (as we can just inject anything which needs to be pooled, like JDBC/JMS connections et al) While auto-discovering pojos is really nice, people may need to wire some pojos together. Or maybe just use annotations and inject these beans. It sounds a bit like SCA ... Maybe we should support the SCA annotations ... There is a Callback annotation which has a condition expression evaluated using jexl each time an consumer exchange is received (i.e. a response to an InOut or a DONE status of an InOnly exchange that the bean has created and sent). The condition is evaluated using jexl. But we need to find a way to not call the same condition several times (maybe keep the old evaluation result and only call the callback when the value changes from false to true). Last, I haven't coded yet how to return the response when using an InOut request. And we also need a way to receive / throw faults. Yeah. Was thinking, if the method returns an object value, we use some kinda marshaller (which could be specified explicitly via an annotation or we could use smart defaults) - to turn it into a message body. Yeah, I think for simple stuff it should quite easy. I was wondering how to receive faults, errors, etc ... And the @Callback has some problems, because it is either: * evaluated each time an exchange is received * or maybe called just once (it is not evaluated anymore when a call has already been performed). Currently, I have implemented the second way, but ... I was wondering if we should give a callback object when sending the exchange instead. You would have more fine grained control. I had also thought about using continuations (as we could control the environment if we create the beans and wire stuff). And this lead me to think that it would sounds a bit like bpmscript... -- James --- http://radio.weblogs.com/0112098/ -- Cheers, Guillaume Nodet
servicemix-bean
I have checked in some new code in servicemix-bean to be able to handle InOut exchanges and acting as a consumer. However there are a few things that do not work yet and some things I did not find a clean way to handle. We can now inject several stuff using @Resource annotation (not yet JNDI references), mainly a ComponentContext and a DeliveryChannel. @PostConstruct is also supported, but I think we need to have scoped beans and create new beans for each request received (or maybe pool them). There is a Callback annotation which has a condition expression evaluated using jexl each time an consumer exchange is received (i.e. a response to an InOut or a DONE status of an InOnly exchange that the bean has created and sent). The condition is evaluated using jexl. But we need to find a way to not call the same condition several times (maybe keep the old evaluation result and only call the callback when the value changes from false to true). Last, I haven't coded yet how to return the response when using an InOut request. And we also need a way to receive / throw faults. Ideas ? -- Cheers, Guillaume Nodet