001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 2005-2006 Bull S.A.S
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * Initial developer(s):
022: * --------------------------------------------------------------------------
023: * $Id: HaTransactionSLR.java 9350 2006-08-03 14:47:47Z japaz $
024: * --------------------------------------------------------------------------
025: */package org.objectweb.haTransactions.ejb;
026:
027: import javax.ejb.CreateException;
028: import javax.ejb.EntityContext;
029:
030: /**
031: * Implementation of the entity bean
032: * @author goebelg
033: */
034: public abstract class HaTransactionSLR implements javax.ejb.EntityBean {
035:
036: /**
037: * Creation of the entity bean
038: * @param txid the primary key -> date.getTime() as string of creation
039: * @return the entity bean
040: * @throws CreateException CreateException
041: */
042: public Object ejbCreate(String txid) throws CreateException {
043: setTxid(txid);
044: return null;
045: }
046:
047: /**
048: * Post create methode invoked after create methode
049: * @param number the pk of the entity bean
050: */
051: public void ejbPostCreate(String txid) {
052: }
053:
054: /**
055: * ejbLoad
056: */
057: public void ejbLoad() {
058: }
059:
060: /**
061: * ejbStore
062: */
063: public void ejbStore() {
064: }
065:
066: /**
067: * Activation of the ejb
068: */
069: public void ejbActivate() {
070: }
071:
072: /**
073: * Passivate the ejb
074: */
075: public void ejbPassivate() {
076: }
077:
078: /**
079: * Removes the ejb
080: */
081: public void ejbRemove() {
082: }
083:
084: /**
085: * Set the EntityContext
086: * @param ec entity context
087: */
088: public void setEntityContext(EntityContext ec) {
089: }
090:
091: /**
092: * Unsets the EntityContext
093: */
094: public void unsetEntityContext() {
095: }
096:
097: /**
098: * Returns the txid
099: * @return The txid
100: */
101: public abstract String getTxid();
102:
103: /**
104: * Sets the txid
105: * @param txid The txid
106: */
107: public abstract void setTxid(String txid);
108: }
|