You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Chris Burnlley (JIRA)" <hi...@jakarta.apache.org> on 2005/09/14 11:09:54 UTC

[jira] Created: (HIVEMIND-150) It is not possible to set a service into a property via schema rules

It is not possible to set a service into a property via schema rules
--------------------------------------------------------------------

         Key: HIVEMIND-150
         URL: http://issues.apache.org/jira/browse/HIVEMIND-150
     Project: HiveMind
        Type: Bug
  Components: framework  
    Versions: 1.1    
 Environment: Mac OS X, Windows 2000, Java 5
    Reporter: Chris Burnlley


The set-property schema conversion rule does not allow one to set a service into a created object. 

The following is an example of something that doesn't work (the following will result in an exception but is not visible if log4j isn't set up): 

<?xml version="1.0"?>
<module id="hivetest" version="1.0.0" package="hivetest">
   
    <service-point id="Comparator" interface="java.util.Comparator">
        <create-instance class="impl.TestComparator"/>   
    </service-point>
           
    <schema id="Obj">
        <element name="obj">
            <attribute name="attr"/>
            <conversion class="impl.Obj"/>
        </element>
        <element name="sobj">
            <attribute name="attr"/>
            <rules>
                <create-object class="impl.Obj"/>
                <invoke-parent method="addElement"/>
                <read-content property="attr"/> 
               <!-- this is the problem line below : -->                            
                <set-property property="comparator" value="service:hivetest.Comparator"/>
            </rules>
        </element>
    </schema>
           
    <configuration-point id="Objs" schema-id="Obj" />
           
    <service-point id="TestService" interface="java.lang.Runnable">
        <invoke-factory>
            <construct class="impl.TestService">
                <set-configuration configuration-id="Objs" property="objs"/>
            </construct>
        </invoke-factory>
    </service-point>

    <contribution configuration-id="hivetest.Objs">
      <obj attr="test"/>
        <obj attr="test2"/>
        <sobj>test3</sobj>
      </contribution>

</module>

Perhaps a set-service rule would be necessary or the set-property rule made a bit smarter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-150) It is not possible to set a service into a property via schema rules

Posted by "Anonymous (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-150?page=all ]

 updated HIVEMIND-150:
----------------------

    Attachment: 150.diff

> It is not possible to set a service into a property via schema rules
> --------------------------------------------------------------------
>
>          Key: HIVEMIND-150
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-150
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Versions: 1.1
>  Environment: Mac OS X, Windows 2000, Java 5
>     Reporter: Chris Burnlley
>  Attachments: 150.diff
>
> The set-property schema conversion rule does not allow one to set a service into a created object. 
> The following is an example of something that doesn't work (the following will result in an exception but is not visible if log4j isn't set up): 
> <?xml version="1.0"?>
> <module id="hivetest" version="1.0.0" package="hivetest">
>    
>     <service-point id="Comparator" interface="java.util.Comparator">
>         <create-instance class="impl.TestComparator"/>   
>     </service-point>
>            
>     <schema id="Obj">
>         <element name="obj">
>             <attribute name="attr"/>
>             <conversion class="impl.Obj"/>
>         </element>
>         <element name="sobj">
>             <attribute name="attr"/>
>             <rules>
>                 <create-object class="impl.Obj"/>
>                 <invoke-parent method="addElement"/>
>                 <read-content property="attr"/> 
>                <!-- this is the problem line below : -->                            
>                 <set-property property="comparator" value="service:hivetest.Comparator"/>
>             </rules>
>         </element>
>     </schema>
>            
>     <configuration-point id="Objs" schema-id="Obj" />
>            
>     <service-point id="TestService" interface="java.lang.Runnable">
>         <invoke-factory>
>             <construct class="impl.TestService">
>                 <set-configuration configuration-id="Objs" property="objs"/>
>             </construct>
>         </invoke-factory>
>     </service-point>
>     <contribution configuration-id="hivetest.Objs">
>       <obj attr="test"/>
>         <obj attr="test2"/>
>         <sobj>test3</sobj>
>       </contribution>
> </module>
> Perhaps a set-service rule would be necessary or the set-property rule made a bit smarter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-150) It is not possible to set a service into a property via schema rules

Posted by "Chris Burnley (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-150?page=all ]

Chris Burnley updated HIVEMIND-150:
-----------------------------------

    Attachment: 150.patch

This includes a fix in SetPropertyRule.java to address a unit test failure ( TestConstructRegistry ).

> It is not possible to set a service into a property via schema rules
> --------------------------------------------------------------------
>
>          Key: HIVEMIND-150
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-150
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Versions: 1.1
>  Environment: Mac OS X, Windows 2000, Java 5
>     Reporter: Chris Burnley
>  Attachments: 150-1.diff, 150-test.zip, 150.diff, 150.patch, 150.patch
>
> The set-property schema conversion rule does not allow one to set a service into a created object. 
> The following is an example of something that doesn't work (the following will result in an exception but is not visible if log4j isn't set up): 
> <?xml version="1.0"?>
> <module id="hivetest" version="1.0.0" package="hivetest">
>    
>     <service-point id="Comparator" interface="java.util.Comparator">
>         <create-instance class="impl.TestComparator"/>   
>     </service-point>
>            
>     <schema id="Obj">
>         <element name="obj">
>             <attribute name="attr"/>
>             <conversion class="impl.Obj"/>
>         </element>
>         <element name="sobj">
>             <attribute name="attr"/>
>             <rules>
>                 <create-object class="impl.Obj"/>
>                 <invoke-parent method="addElement"/>
>                 <read-content property="attr"/> 
>                <!-- this is the problem line below : -->                            
>                 <set-property property="comparator" value="service:hivetest.Comparator"/>
>             </rules>
>         </element>
>     </schema>
>            
>     <configuration-point id="Objs" schema-id="Obj" />
>            
>     <service-point id="TestService" interface="java.lang.Runnable">
>         <invoke-factory>
>             <construct class="impl.TestService">
>                 <set-configuration configuration-id="Objs" property="objs"/>
>             </construct>
>         </invoke-factory>
>     </service-point>
>     <contribution configuration-id="hivetest.Objs">
>       <obj attr="test"/>
>         <obj attr="test2"/>
>         <sobj>test3</sobj>
>       </contribution>
> </module>
> Perhaps a set-service rule would be necessary or the set-property rule made a bit smarter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-150) It is not possible to set a service into a property via schema rules

Posted by "Chris Burnlley (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-150?page=all ]

Chris Burnlley updated HIVEMIND-150:
------------------------------------

    Attachment: 150-test.zip

Added tests cases illustrating issue

> It is not possible to set a service into a property via schema rules
> --------------------------------------------------------------------
>
>          Key: HIVEMIND-150
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-150
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Versions: 1.1
>  Environment: Mac OS X, Windows 2000, Java 5
>     Reporter: Chris Burnlley
>  Attachments: 150-1.diff, 150-test.zip, 150.diff
>
> The set-property schema conversion rule does not allow one to set a service into a created object. 
> The following is an example of something that doesn't work (the following will result in an exception but is not visible if log4j isn't set up): 
> <?xml version="1.0"?>
> <module id="hivetest" version="1.0.0" package="hivetest">
>    
>     <service-point id="Comparator" interface="java.util.Comparator">
>         <create-instance class="impl.TestComparator"/>   
>     </service-point>
>            
>     <schema id="Obj">
>         <element name="obj">
>             <attribute name="attr"/>
>             <conversion class="impl.Obj"/>
>         </element>
>         <element name="sobj">
>             <attribute name="attr"/>
>             <rules>
>                 <create-object class="impl.Obj"/>
>                 <invoke-parent method="addElement"/>
>                 <read-content property="attr"/> 
>                <!-- this is the problem line below : -->                            
>                 <set-property property="comparator" value="service:hivetest.Comparator"/>
>             </rules>
>         </element>
>     </schema>
>            
>     <configuration-point id="Objs" schema-id="Obj" />
>            
>     <service-point id="TestService" interface="java.lang.Runnable">
>         <invoke-factory>
>             <construct class="impl.TestService">
>                 <set-configuration configuration-id="Objs" property="objs"/>
>             </construct>
>         </invoke-factory>
>     </service-point>
>     <contribution configuration-id="hivetest.Objs">
>       <obj attr="test"/>
>         <obj attr="test2"/>
>         <sobj>test3</sobj>
>       </contribution>
> </module>
> Perhaps a set-service rule would be necessary or the set-property rule made a bit smarter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-150) It is not possible to set a service into a property via schema rules

Posted by "Chris Burnlley (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-150?page=all ]

Chris Burnlley updated HIVEMIND-150:
------------------------------------

    Attachment: 150-1.diff

This is an update to the previous diff I attached with the DescriptorParser.properties file change.

> It is not possible to set a service into a property via schema rules
> --------------------------------------------------------------------
>
>          Key: HIVEMIND-150
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-150
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Versions: 1.1
>  Environment: Mac OS X, Windows 2000, Java 5
>     Reporter: Chris Burnlley
>  Attachments: 150-1.diff, 150.diff
>
> The set-property schema conversion rule does not allow one to set a service into a created object. 
> The following is an example of something that doesn't work (the following will result in an exception but is not visible if log4j isn't set up): 
> <?xml version="1.0"?>
> <module id="hivetest" version="1.0.0" package="hivetest">
>    
>     <service-point id="Comparator" interface="java.util.Comparator">
>         <create-instance class="impl.TestComparator"/>   
>     </service-point>
>            
>     <schema id="Obj">
>         <element name="obj">
>             <attribute name="attr"/>
>             <conversion class="impl.Obj"/>
>         </element>
>         <element name="sobj">
>             <attribute name="attr"/>
>             <rules>
>                 <create-object class="impl.Obj"/>
>                 <invoke-parent method="addElement"/>
>                 <read-content property="attr"/> 
>                <!-- this is the problem line below : -->                            
>                 <set-property property="comparator" value="service:hivetest.Comparator"/>
>             </rules>
>         </element>
>     </schema>
>            
>     <configuration-point id="Objs" schema-id="Obj" />
>            
>     <service-point id="TestService" interface="java.lang.Runnable">
>         <invoke-factory>
>             <construct class="impl.TestService">
>                 <set-configuration configuration-id="Objs" property="objs"/>
>             </construct>
>         </invoke-factory>
>     </service-point>
>     <contribution configuration-id="hivetest.Objs">
>       <obj attr="test"/>
>         <obj attr="test2"/>
>         <sobj>test3</sobj>
>       </contribution>
> </module>
> Perhaps a set-service rule would be necessary or the set-property rule made a bit smarter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-150) It is not possible to set a service into a property via schema rules

Posted by "Chris Burnley (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-150?page=all ]

Chris Burnley updated HIVEMIND-150:
-----------------------------------

    Attachment: 150.patch

This patch includes my previous changes plus changes for the documentation.

I really would like this to be considered as I think it is a low-impact change and makes the configuration process more userfriendly.

> It is not possible to set a service into a property via schema rules
> --------------------------------------------------------------------
>
>          Key: HIVEMIND-150
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-150
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Versions: 1.1
>  Environment: Mac OS X, Windows 2000, Java 5
>     Reporter: Chris Burnley
>  Attachments: 150-1.diff, 150-test.zip, 150.diff, 150.patch
>
> The set-property schema conversion rule does not allow one to set a service into a created object. 
> The following is an example of something that doesn't work (the following will result in an exception but is not visible if log4j isn't set up): 
> <?xml version="1.0"?>
> <module id="hivetest" version="1.0.0" package="hivetest">
>    
>     <service-point id="Comparator" interface="java.util.Comparator">
>         <create-instance class="impl.TestComparator"/>   
>     </service-point>
>            
>     <schema id="Obj">
>         <element name="obj">
>             <attribute name="attr"/>
>             <conversion class="impl.Obj"/>
>         </element>
>         <element name="sobj">
>             <attribute name="attr"/>
>             <rules>
>                 <create-object class="impl.Obj"/>
>                 <invoke-parent method="addElement"/>
>                 <read-content property="attr"/> 
>                <!-- this is the problem line below : -->                            
>                 <set-property property="comparator" value="service:hivetest.Comparator"/>
>             </rules>
>         </element>
>     </schema>
>            
>     <configuration-point id="Objs" schema-id="Obj" />
>            
>     <service-point id="TestService" interface="java.lang.Runnable">
>         <invoke-factory>
>             <construct class="impl.TestService">
>                 <set-configuration configuration-id="Objs" property="objs"/>
>             </construct>
>         </invoke-factory>
>     </service-point>
>     <contribution configuration-id="hivetest.Objs">
>       <obj attr="test"/>
>         <obj attr="test2"/>
>         <sobj>test3</sobj>
>       </contribution>
> </module>
> Perhaps a set-service rule would be necessary or the set-property rule made a bit smarter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org