One advantage to using XML for the bean representation (as nordijia does) is that you could actually use XSLT for the templates and the session bean would only have to run an XSLT stylesheet on the XML to generate the output.  If you don't like XSLT you could also use something like Rickard's template language - check dreambean.com - against an input XML file and keep the session bean itself very general just operating on some data.  Maybe it'd be easier as a JSP/Servlet since people have already written servlets that perform XSLT transforms.
 
Cheers
-----Original Message-----
From: Rob Castaneda [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 09, 2000 8:50 PM
To: jBoss
Subject: RE: [jBoss-User] Does www.jboss.org run jboss? and what do peoplethink about an EJB code generator

Here's one that you can look at for ideas
 
 
 
-Rob
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of marc fleury
Sent: Thursday, November 09, 2000 1:46 PM
To: jBoss
Subject: RE: [jBoss-User] Does www.jboss.org run jboss? and what do peoplethink about an EJB code generator

It's a cute idea though, can you package it as a series of beans? with JSP and all, i.e. a ear?
 
marc
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Henderson
Sent: Thursday, November 09, 2000 7:18 AM
To: jBoss
Subject: [jBoss-User] Does www.jboss.org run jboss? and what do peoplethink about an EJB code generator

Hi all...
 
Im currently learning all about jboss and EJBs, and I have started to develop an EJB to generate SesssionBean template code.
I was wondering if it would be worth running this on the jboss site to enable developers to get a good starting point for ejb development.
(hit a jsp page, fill out bean name and package etc, press the go button, hey presto the bean ;-)
 
If people think this is a good idea then I will continue with this little project, adding support for Entity beans etc.
 
I know there is another site that does a similar thing, but I dont think it is open source...
 
 
example output... (rough and ready at the moment)
 
 
++++++++++++++++++ Remote interface ++++++++++++++++++
/*
 * BannanaSession.java
 *
 * Wednesday, November 8, 2000
 *
 * Copyright (c) 2000 by Contact Point Technologies, Inc.
 * All rights reserved.
 *
 * Legal notice goes here
 */
package com.cpt.bannana;
 
import javax.ejb.EJBObject;
import javax.ejb.EJBHome;
import javax.ejb.Handle;
import java.rmi.RemoteException;
 
public interface BannanaSession extends EJBObject, BannanaSessionBusinessInterface {
}
 
 
+++++++++++++++++++++++ The BEAN +++++++++++++++++++++
/*
 * BannanaSessionBean.java
 *
 * Wednesday, November 8, 2000
 *
 * Copyright (c) 2000 by Contact Point Technologies, Inc.
 * All rights reserved.
 *
 * Legal notice goes here
 *
 */
package com.cpt.bannana;
 
import javax.ejb.*;
import javax.naming.*;
import java.rmi.RemoteException;
import javax.rmi.PortableRemoteObject;
import java.security.*;
 
import com.cpt.util.ByteUtils;
 
public class BannanaSessionBean implements SessionBean, BannanaSessionBusinessInterface {
 
    private static final boolean VERBOSE = true;    // set to false for release....
    private SessionContext ctx;
 
    public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException {
    }
    public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException {
    }
    public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException {
    }
    public void setSessionContext(SessionContext ctx) throws javax.ejb.EJBException, java.rmi.RemoteException {
        this.ctx = ctx;
    }
    public void ejbCreate() throws CreateException {
        if ( VERBOSE ) System.out.println("in BannanaSessionBean.ejbCreate " );
    }
 
    ////////////////////////////////////////////////////////////
    //// BUSINESS FUNCTIONS
    ////////////////////////////////////////////////////////////
    /** todo business functions go here */
    public String someFunction() throws RemoteException {
    }
}
 
 
++++++++++++++++ Business interface ++++++++++++++
/*
 * LicenceKeyGenSessionBusinessInterface.java
 *
 * Wednesday, November 8, 2000
 *
 * Copyright (c) 2000 by Contact Point Technologies, Inc.
 * All rights reserved.
 *
 * Legal notice goes here
 */
package com.cpt.bannana;
 
import java.rmi.RemoteException;
 
public interface BannanaSessionBusinessInterface {
    public String someFunction() throws RemoteException;
}
 
 
+++++++++ The home interface ++++++++
/*
 * BannanaSessionHome.java
 *
 * Wednesday, November 8, 2000
 *
 * Copyright (c) 2000 by Contact Point Technologies, Inc.
 * All rights reserved.
 *
 *
 */
package com.cpt.bannana;
 
import javax.ejb.EJBHome;
import javax.ejb.EJBMetaData;
import javax.ejb.HomeHandle;
import javax.ejb.Handle;
import javax.ejb.CreateException;
import java.rmi.RemoteException;
 
public interface BannanaSessionHome extends EJBHome {
    BannanaSession create() throws RemoteException, CreateException;
}
 

Reply via email to