You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org> on 2006/10/12 18:48:35 UTC

[jira] Created: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

ComponentType sidefiles do not work for Pojo Implementation
-----------------------------------------------------------

                 Key: TUSCANY-833
                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
             Project: Tuscany
          Issue Type: Bug
            Reporter: Venkatakrishnan


If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.

A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-833?page=all ]

Jim Marino resolved TUSCANY-833.
--------------------------------

    Fix Version/s: Java-Mx
       Resolution: Fixed

Fixed in trunk (not M2)

> ComponentType sidefiles do not work for Pojo Implementation
> -----------------------------------------------------------
>
>                 Key: TUSCANY-833
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA POJO Container
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>         Assigned To: Jim Marino
>            Priority: Critical
>             Fix For: Java-Mx
>
>
> If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.
> A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

Posted by "Jeremy Boynes (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-833?page=comments#action_12441857 ] 
            
Jeremy Boynes commented on TUSCANY-833:
---------------------------------------

Jim's proposal to the mailing list sounds like a better long-term solution but I am concerned that doing it this close to the release of M2 will be destabilizing. Propogating the approach used by the script containers does not provide the full function that we need from sidefiles - for example, it does not support scope and lifecycle method configuration that is available via annotation.

I think we should tackle this problem as follows:
1. Create the branch using the code as it is today and document that sidefiles are not supported for Java components. This is the status quo.
2. Fix this in head the "right way" (whatever that is), assess the impact of that patch and consider applying it to the M2 branch before release.
3. Create a patch for the M2 branch that provides sidefile support with minimal destablization (however that can be done).

The patches from 2 and 3 provide concrete implementations that we can evaluate for incorporation into M2, balancing the benefit of fixing the bug vs. the potential destabilization.

> ComponentType sidefiles do not work for Pojo Implementation
> -----------------------------------------------------------
>
>                 Key: TUSCANY-833
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA POJO Container
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>         Assigned To: Jim Marino
>            Priority: Critical
>
> If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.
> A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-833?page=comments#action_12441825 ] 
            
Jim Marino commented on TUSCANY-833:
------------------------------------

Proliferating an encapsulation approach to extensions is the wrong way to fix this as it will just add to the problems. Moreover, it will not solve the issue for Java Pojos. Either we should treat this as a blocker for M2 and fix it or release note that it does not work. 

I outlined in an email to the list yesterday how to fix this. For the specific script issues, a better workaround involves moving lifecycle scope to the base component type (which would involve moving it from PojoComponentType) as I also outlined. There are, however, other issues which still need to be addressed regarding script extensions as I mentioned in the same mail, which I'm happy to help with. 

> ComponentType sidefiles do not work for Pojo Implementation
> -----------------------------------------------------------
>
>                 Key: TUSCANY-833
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA POJO Container
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>         Assigned To: Jim Marino
>            Priority: Critical
>
> If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.
> A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-833?page=all ]

Jim Marino reassigned TUSCANY-833:
----------------------------------

    Assignee: Jim Marino

> ComponentType sidefiles do not work for Pojo Implementation
> -----------------------------------------------------------
>
>                 Key: TUSCANY-833
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA POJO Container
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>         Assigned To: Jim Marino
>            Priority: Critical
>
> If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.
> A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-833?page=comments#action_12441870 ] 
            
Jim Marino commented on TUSCANY-833:
------------------------------------

Responding to Jeremy specifically, I would prefer to do the "right way" after M2 given side files for POJOs don't really do very much.  As for copying the component type in the Java implementation loader, I really don't want to do this since IMO introducing workarounds should only be done in extreme circumstances. For extension types, they definitely shouldn't do this. So, my preference would be option 4: release note it. 


> ComponentType sidefiles do not work for Pojo Implementation
> -----------------------------------------------------------
>
>                 Key: TUSCANY-833
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA POJO Container
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>         Assigned To: Jim Marino
>            Priority: Critical
>
> If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.
> A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-833?page=comments#action_12441862 ] 
            
Jim Marino commented on TUSCANY-833:
------------------------------------

Looking into this more, my preference would be not to fix this or do a hack for M2 since for POJOs, component type side files aren't really useful do to some spec issues. Even if we were to fix the problems outlined, the only things that can be specified in a side file are services, references and proprties. The spec has not yet defined how to represent specific Java concepts such as init/destroy and implementation scopes in the component type schema. This renders side files not very useful.  The only type of POJO implementation that could be specified with a side file is statelesss with no intitialization or destruction callbacks. In addition, we already support the algorithm for determining services, references and properties on an unannotated POJO, relegating the need to actuallly have to specify a side file to mostly corner cases involving legacy code.

Given the need to stabilize a brach, I think we should release note that we do not support component type side files for POJOs with M2.   

> ComponentType sidefiles do not work for Pojo Implementation
> -----------------------------------------------------------
>
>                 Key: TUSCANY-833
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA POJO Container
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>         Assigned To: Jim Marino
>            Priority: Critical
>
> If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.
> A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-833) ComponentType sidefiles do not work for Pojo Implementation

Posted by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-833?page=all ]

Venkatakrishnan updated TUSCANY-833:
------------------------------------

          Component/s: Java SCA POJO Container
    Affects Version/s: Java-M2
             Priority: Critical  (was: Major)

> ComponentType sidefiles do not work for Pojo Implementation
> -----------------------------------------------------------
>
>                 Key: TUSCANY-833
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-833
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA POJO Container
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>            Priority: Critical
>
> If you have a component type sidefile for a Pojo implementation we end up with an exception.  The reason for this is that the JavaComponentTypeLoader passes the PojoComponenType.class to the loader registry to be returned as a result.  However what gets created is an instance of the base ComponentType and then there is an attempt to narrrow this to a PojoComponentType which results in an exception.
> A quick alternative in the interest of M2 fast approaching would be to take the approach that the containers have to get over this problem which is for the containers to get the base ComponentType and copy it over to the special ones.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org