facebook

EJB interfaces

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #216218 Reply

    Horacio
    Member

    Hi.
    We need to have all EJB home/local home/remote/local interfaces extend from a corresponding interface of our creation. We created these interfaces, but we couldn’t make ME to use them without overwritting them. Is this possible?
    Also, is it possible to tell ME to use imports instead of FQN classes?
    Thanks.

    #216243 Reply

    Riyad Kalla
    Member

    In the JSP editor, FQN is the current behavior, auto-imports will be readded soon. I will ask our XDoclet guy about the other question.

    #216263 Reply

    Greg
    Member

    How you tried the “remote-business-interface” and “local-business-interface” attributes under the @ejb.bean xdoclet tag? They appear to allow you to specify the class the remote and local interface that they should extend. I haven’t actually tried this myself but this was just my first thought after looking at your problem.

    #216292 Reply

    Horacio
    Member

    That didn’t work. It added the class to the extends clause, but it didn’t add the import or FQN. Also, can I use a template? The XDoclet docs says it’s possible, but I couldn’t figure that out.
    XDoclet is also creating the interfaces the wrong way. Since all the interfaces extend one we created, wich defines a create() wich returns a superclass for all remote interfaces, and since XDoclet is making create() return the specfic kind of remote interface that corresponds to the EJB in question, the code does not compile.
    Any help is welcome.

    #216402 Reply

    Greg
    Member

    What about using the following xdoclet tags:

    
    * @ejb.interface 
    *      local-class = "..."
    *      remote-class = "..." 
    * @ejb.home 
    *      local-class = "..."
    *      remote-class = "..."
    #216415 Reply

    Horacio
    Member

    Hi again.
    That didn’t work for what I need.
    I need the interfaces created acording to some template (specificaly I need the return-type of the create() methods to be the class returned by the declared super-interface, not the specific type of the corresponding EJB, because it doesn’t work if that’s not the case).

    Eg:
    This is the root home interface.

    
    public interface AbstractSessionHome extends EJBHome {
        public AbstractSession create() throws CreateException, RemoteException;
    }
    

    This is what XDoclet creates

    
    public interface SessionManagerHome extends AbstractSessionHome {
        public SessionManager create() throws CreateException, RemoteException;
    }
    

    This is what I need:

    
    public interface SessionManagerHome extends AbstractSessionHome {
        public AbstractSession create() throws CreateException, RemoteException;
    }
    

    Is this possible?
    Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: EJB interfaces

You must be logged in to post in the forum log in