Message:

   The following issue has been re-assigned.

   Assignee: xdoclet-devel (Use for new issues) (mailto:[EMAIL PROTECTED])
---------------------------------------------------------------------
View the issue:

  http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-120


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-120
    Summary: (local)home interfaces shouldn't use inheritance
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             EJB Module
   Versions:
             1.2 Beta 2

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Aslak Helles�y

    Created: Mon, 28 Oct 2002 9:51 AM
    Updated: Thu, 22 Jan 2004 5:25 PM

Description:
the methods in these interfaces they can be thought of as an alternative for static 
factory methods. static stuff is never inherited in "normal" java, and they shouldn't 
here either (even though it's technically possible).

the problem is that inherited finders will return bad component types.

example: BBean extends ABean -> OK

public interface AHome extends javax.ejb.EJBLocalHome {
   public A create();
   public A findByPrimaryKey(APK pk);
   public Collection findNiceOnes();
}

public interface BHome extends AHome {
   public B create();
   public B findByPrimaryKey(BPK pk);
   public Collection findCozyOnes();
}

Now assume you have an instance of BHome. Since it inherits from AHome, you can call 
methods defined in AHome. Does it make sense to call any of these methods? No. 
-Because if you do, the results you get won't be of type B anyway, that's why.

Therefore, all (local)home interfaces should just extend EJB(Local)Home, regardless of 
component inheritance.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to