01: package EJB;
02:
03: /**
04: * A small example bean method.
05: *
06: * (This is an unsupported outline. But Dan H got it all to work.)
07: */
08: public class EJBTest {
09:
10: public static void main(String[] args) {
11:
12: public void testMethod() throws Exception
13: {
14: DatabaseORM db = baseServiceBean.getDatabaseORM();
15:
16: // We now have an SConnection associated with the current Transaction
17: // which is accessible in the normal way.
18: // eg. we can call findOrCreate etc.
19:
20: CustomerRaw cust = (CustomerRaw) db.create(new CustomerRaw());
21: cust.setFIRSTNAMERaw("Test1");
22: cust.setLASTNAMERaw("Last1");
23: cust.setEMAILRaw("test@yahoo.com");
24: }
25:
26: }
27: }
|