Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
19 replies Latest Post - ‏2013-02-25T17:18:36Z by SmartCap
SmartCap
SmartCap
15 Posts
ACCEPTED ANSWER

Pinned topic SCA Composite not communicating

‏2013-02-22T15:37:54Z |
Hello,

Please find below composite and can anyone suggest anything wrong with this?

i have two spring based implementation wired thro open SCA and i get below warning always

ComponentRefe W No targets for reference: Composite = {http://spring.test/bindings}TestMe Reference = testReference

Can you please help us on this?

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" name="TestMe" targetNamespace="http://spring.test/bindings">
<component autowire="false" name="TestSCAComponent_1">
<implementation.spring location="META-INF/Beans.xml"/>
<service name="testServiceSCA_1">
<interface.java interface="com.vj.service.TestService"/>
<binding.sca/>
</service>
<reference name="testReference" target="TestNewComponent_1/testServiceSCA_2">
<interface.java interface="com.vj.service.TestNewService"/>
</reference>
</component>
<component autowire="false" name="TestNewComponent_1">
<implementation.spring location="META-INF/Beans.xml"/>
<service name="testServiceSCA_2">
<interface.java interface="com.vj.service.TestNewService"/>
<binding.sca/>
</service>
</component>
</composite>
Updated on 2013-02-25T17:18:36Z at 2013-02-25T17:18:36Z by SmartCap
  • SystemAdmin
    SystemAdmin
    126 Posts
    ACCEPTED ANSWER

    Re: SCA Composite not communicating

    ‏2013-02-22T16:00:47Z  in response to SmartCap
    Hello Vijay,

    I do not have your spring implementations, but I am using Rational Application Developer for WebSphere software and when I fall into these scenarios I just right click the problematic component (TestSCAComponent_1 in this case) then refresh from implementation, this action introspect your implementation and bring all the properties, references and services defined in the implementation. If you provide the spring implementations I could help you a bit more with it. Also can you mention what Spring version are you using?
    • SmartCap
      SmartCap
      15 Posts
      ACCEPTED ANSWER

      Re: SCA Composite not communicating

      ‏2013-02-22T16:07:18Z  in response to SystemAdmin
      Thanks Adrian

      i have attached my asset which has the necessary files.

      Can you help me out what is wrong in this?

      thanks
      vijay
      • SmartCap
        SmartCap
        15 Posts
        ACCEPTED ANSWER

        Re: SCA Composite not communicating

        ‏2013-02-22T16:12:08Z  in response to SmartCap
        Reflection is not supported for this implementation type: org.apache.tuscany.sca.implementation.spring.SpringImplementation

        so i dont think i can do that

        thanks
        vijay
        • SystemAdmin
          SystemAdmin
          126 Posts
          ACCEPTED ANSWER

          Re: SCA Composite not communicating

          ‏2013-02-22T17:14:43Z  in response to SmartCap
          What version of Rational Application Developer for WebSphere software are you using?
    • SmartCap
      SmartCap
      15 Posts
      ACCEPTED ANSWER

      Re: SCA Composite not communicating

      ‏2013-02-22T16:17:16Z  in response to SystemAdmin
      Spring version is 2.5.5
    • SmartCap
      SmartCap
      15 Posts
      ACCEPTED ANSWER

      Re: SCA Composite not communicating

      ‏2013-02-22T16:22:06Z  in response to SystemAdmin
      Consider this message and attachment.

      Spring version 2.5.5

      when i try to refresh from implementation i get following error

      Reflection is not supported for this implementation type: org.apache.tuscany.sca.implementation.spring.SpringImplementation.
    • SmartCap
      SmartCap
      15 Posts
      ACCEPTED ANSWER

      Re: SCA Composite not communicating

      ‏2013-02-22T20:07:38Z  in response to SystemAdmin
      I was able to resolve the warning by changing the multiplicity to 1..1

      but my service in another component is not invoked automatically after my first service is completed. do i need to specify anywhere to invoke it?
      • SystemAdmin
        SystemAdmin
        126 Posts
        ACCEPTED ANSWER

        Re: SCA Composite not communicating

        ‏2013-02-22T21:27:09Z  in response to SmartCap
        Hello Vijay,

        I was not able to look really deep into the logic of your application because the file you attached has only binaries, but I was able to execute the "Refresh from implementation action" but I realize while deploying that class com.vj.domain.LockDomain was not found.

        It is very odd that you get a dialog saying that it's not supported because it is, I could help you more if you provide more details on your development environment, the app with the source if possible or maybe you can try the SCA Spring sample from RAD Help;, you can get it by clicking Help > Help Contents > Samples > SCA > SCA 1.0 Spring Sample in Rational Application Developer.
        • SmartCap
          SmartCap
          15 Posts
          ACCEPTED ANSWER

          Re: SCA Composite not communicating

          ‏2013-02-22T21:42:24Z  in response to SystemAdmin
          Thanks Adrian.

          My objective is very simple

          i have TestService implemented by TestServiceImpl - this does a DB insertion. you can comment the db call and just print some sysout

          i have another interface TestNewService which just throws an error back

          both are in same asset.

          Basically i want to see whether i can communicate and propogate transaction between these two through SCA binding.

          this will help me in concluding some of the design pattern that we have.

          i have a client that call the TestService through CompositeContext method and i want test new service to be called with the wiring that i gave through composite diagram. Is that possible? If so do i need to mention any in config xml or ?

          thanks
          vijay
          • SmartCap
            SmartCap
            15 Posts
            ACCEPTED ANSWER

            Re: SCA Composite not communicating

            ‏2013-02-22T21:46:53Z  in response to SmartCap
            Sorry i missed the attachment.

            you can comment db and just sysout is fine. i want to see how two sca communicate

            thanks
            vijay

            Attachments

        • SmartCap
          SmartCap
          15 Posts
          ACCEPTED ANSWER

          Re: SCA Composite not communicating

          ‏2013-02-23T01:20:29Z  in response to SystemAdmin
          Adrian,

          I was able to fix the communication.

          CAn you help me how to propogate new transaction to spring implementation

          thanks
          vijay
          • SmartCap
            SmartCap
            15 Posts
            ACCEPTED ANSWER

            Re: SCA Composite not communicating

            ‏2013-02-23T17:42:32Z  in response to SmartCap
            Hello All,

            Does the managedTransaction.global can be used in component if the implementation is spring?

            How to make component not participate in txn?

            i have trial version does this supported in that?

            thanks
            vijay
          • SystemAdmin
            SystemAdmin
            126 Posts
            ACCEPTED ANSWER

            Re: SCA Composite not communicating

            ‏2013-02-25T14:57:43Z  in response to SmartCap
            Hello Vijay,

            Take a look at this thread, I think it's similar to what you are trying to accomplish.

            https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14678184&#14678184
            • SmartCap
              SmartCap
              15 Posts
              ACCEPTED ANSWER

              Re: SCA Composite not communicating

              ‏2013-02-25T15:12:28Z  in response to SystemAdmin
              thanks adrian.

              that helps me understand JMS perspective. Mine is simple SCA

              two implementation of Spring

              1 Required
              2 Requires_New

              SCA component set to propogatesTransaction/SuspendTransaction does not initiate new transaction for Requires_New it goes in the same thread as that of required.

              I am missing some where? do i need to use exactlyOnce?

              thanks
              vijay
              • SystemAdmin
                SystemAdmin
                126 Posts
                ACCEPTED ANSWER

                Re: SCA Composite not communicating

                ‏2013-02-25T15:34:28Z  in response to SmartCap
                Intents work the same regardless the implementation type, what I saw in such thread is that propagateTransaction intent was not doing what user expected but the exactlyOnce intent work for them, may be you should try that out, honestly my acknowledge regarding intents is a bit limited. But here is an entire chapter of Transaction support in WebSphere Application Server, have a look and let me know if it worked for you.

                http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.jpafep.multiplatform.doc%2Finfo%2Fae%2Fae%2Fcjta_trans.html
              • SystemAdmin
                SystemAdmin
                126 Posts
                ACCEPTED ANSWER

                Re: SCA Composite not communicating

                ‏2013-02-25T15:48:58Z  in response to SmartCap
                Now, if you want to initiate a new transaction for Requires_New different from Requires transaction then I think it is the default behavior (i.e. no intents)
                • SmartCap
                  SmartCap
                  15 Posts
                  ACCEPTED ANSWER

                  Re: SCA Composite not communicating

                  ‏2013-02-25T17:18:36Z  in response to SystemAdmin
                  thanks adrian

                  i dont think SCA is propogating the transaction in case of required

                  suspending the transaction in case of required new

                  always the same thread initiated is being used

                  thanks
                  vijay