Update of
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-weblogic/src/test/java/org/xdoclet/testapp/ejb/beans
In directory
sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4362/plugin-weblogic/src/test/java/org/xdoclet/testapp/ejb/beans
Added Files:
AccountBean.java BaseClientBean.java ClientBean.java
CompanyClientBean.java TransferBean.java
TransferReceiverBean.java
Log Message:
syncronisation. evrythiing builds up to webwork
--- NEW FILE: BaseClientBean.java ---
/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.testapp.ejb.beans;
import java.util.Collection;
import org.xdoclet.testapp.ejb.interfaces.NoNumberException;
/**
* This is part of the common test application for all ejb-related
* XDoclet plugin. Vendor-specific tags should be added herein.
*
* @ejb.bean name="xxx" generate="false" jndi-name="jndi.ClientRemote"
local-jndi-name="jndi.ClientLocal"
* @ejb.pk-xxx implements="org.xdoclet.testapp.ejb.interfaces.Dummy"
*
* @weblogic.cache
* max-beans-in-cache = "1"
* max-queries-in-cache = "2"
* idle-timeout-seconds = "3"
* read-timeout-seconds = "4"
* concurrency-strategy="A"
* cache-between-transactions = "true"
*
* @author Diogo Quintela
* @author Ive Hellemans
* @version $Revision: 1.1 $
*/
public abstract class BaseClientBean {
/**
* @ejb.interface-method view-type="local"
* @ejb.relation name="all-accounts" role-name="admin" target-ejb="Account"
*
* @weblogic.column-map
* foreign-key-column="FK_COL"
* key-column="PK_COL"
*
* @return Collection of [EMAIL PROTECTED] AccountLocal}
*/
public abstract Collection getAllAccounts();
/**
* @ejb.interface-method view-type="both"
* @ejb.persistence-field column-name="IDENTITY_NUMBER"
* @ejb.pk-field
* @return the account number
*/
public abstract String getIdentityNumber() throws NoNumberException;
}
--- NEW FILE: TransferReceiverBean.java ---
/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.testapp.ejb.beans;
import javax.ejb.EJBException;
import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
/**
* This is part of the common test application for all ejb-related
* XDoclet plugin. Vendor-specific tags should be added herein.
*
* @author Diogo Quintela
* @author Ive Hellemans
*
* @ejb.bean name="TransferReceiverBean" type="Stateless"
transaction-type="Container" message-selector="abc"
* acknowledge-mode="Auto-acknowledge"
destination-type="javax.jms.Queue"
* destination-jndi-name="dest/jndi/queue"
connection-factory-jndi-name="jndi/conn/factory"
* subscription-durability="NonDurable"
jndi-name="jndi.TransferReceiver"
*
* @ejb.activation-config-property name="dumbName1" value="dumbValue1"
* @ejb.activation-config-property name="dumbName2" value="dumbValue2"
*
* @ejb.env-entry name="entryName1" value="entryValue1"
* @ejb.env-entry name="entryName2" type="java.lang.Integer"
description="entryDesc"
*
* @ejb.destination-ref name="refName1" type="refType1" description="refDesc"
link="refLink"
* @ejb.destination-ref name="refName2" type="refType2" usage="Consumes"
*
* @ejb.security-role-ref role-name="roleName1" role-link="roleLink1"
* @ejb.security-role-ref role-name="roleName2" role-link="roleLink2"
*
* @ejb.security-identity description="secDescription1"
use-caller-identity="false" run-as="secRunAs1"
* @xxxejb.security-identity description="secDescription2"
use-caller-identity="true" run-as="secRunAs2"
*
* @ejb.ejb-ref ejb-name="Account" view-type="remote"
* @ejb.ejb-ref ejb-name="Account"
*
* @ejb.ejb-external-ref ref-name="ejb/OtherBean"
business="org.xdoclet.testapp.ejb.interfaces.OtherRemote"
*
home="org.xdoclet.testapp.ejb.interfaces.OtherRemoteHome" type="Entity"
*
* @ejb.ejb-service-ref name="ServiceRefName" description="ServiceRefDesc"
interface="ServiceRefClass"
* jaxrpc-mapping-file="jaxrp-file" qname="ServiceRefQName"
* wsdl-file-uri="ServiceRefFileURI"
*
* @ejb.resource-ref res-ref-name="ResRefName1" res-type="ResRefType1"
res-auth="Container"
* description="ResRefDescription1"
* @ejb.resource-ref res-ref-name="ResRefName2" res-type="ResRefType2"
res-auth="Container"
* description="ResRefDescription2"
res-sharing-scope="Unshareable"
* @ejb.resource-env-ref name="ResEnvRefName1" type="ResEnvRefType1"
description="ResEnvRefDescription1"
*/
public class TransferReceiverBean implements MessageDrivenBean {
/**
* @ejb.ejb-external-ref
business="org.xdoclet.testapp.ejb.interfaces.OtherRemote"
*
home="org.xdoclet.testapp.ejb.interfaces.OtherRemoteHome"
* type="Entity"
* @ejb.ejb-service-ref description="ServiceRefDesc"
interface="ServiceRefClass"
* jaxrpc-mapping-file="jaxrp-file"
qname="ServiceRefQName"
* @ejb.resource-ref res-type="ResRefType2" res-auth="Application"
description="ResRefDescription2"
* @ejb.resource-env-ref
*/
protected String refField;
public void ejbRemove() throws EJBException {
// empty
}
public void setMessageDrivenContext(MessageDrivenContext arg0) throws
EJBException {
// empty
}
}
--- NEW FILE: ClientBean.java ---
/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.testapp.ejb.beans;
import java.util.Collection;
import javax.ejb.EntityBean;
/**
* This is part of the common test application for all ejb-related
* XDoclet plugin. Vendor-specific tags should be added herein.
*
* @ejb.pk pattern="{0}PrimaryKey"
* @ejb.home local-pattern="{0}LocalHomeIFace"
remote-pattern="{0}RemoteHomeIFace"
* @ejb.interface local-pattern="{0}LocalIFace" pattern="{0}IFace"
* @ejb.transaction type="Supports"
* @ejb.persistence table-name="CLIENT_T"
*
* @author Diogo Quintela
* @author Ive Hellemans
* @version $Revision: 1.1 $
*/
public abstract class ClientBean extends BaseClientBean implements EntityBean {
/**
* @ejb.interface-method view-type="local"
* @ejb.relation name="user-accounts" role-name="user"
*
* @weblogic.column-map foreign-key-column="USER_FK"
key-column="IDENTITY_NUMBER"
*
* @return Collection of [EMAIL PROTECTED] AccountLocal}
*/
public abstract Collection getAccounts();
}
--- NEW FILE: TransferBean.java ---
/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.testapp.ejb.beans;
import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.FinderException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.naming.NamingException;
/**
* This is part of the common test application for all ejb-related
* XDoclet plugin. Vendor-specific tags should be added herein.
*
* @ejb.bean name="Transfer" view-type="all" jndi-name="jndi.TransferRemote"
local-jndi-name="jndi.TransferLocal"
* @ejb.interface generate="local,remote,service-endpoint"
*
* @weblogic.enable-call-by-reference True
* @weblogic.pool max-beans-in-free-pool = 10 initial-beans-in-free-pool = 10
* @weblogic.clustering
* home-is-clusterable = True
* home-load-algorithm = x
* home-call-router-class-name = y
* use-serverside-stubs = false
* stateless-bean-is-clusterable = true
* stateless-bean-load-algorithm = a
* stateless-bean-call-router-class-name = b
* @weblogic.resource-description
* res-ref-name = "jdbc/datasource"
* jndi-name = "testapp-ejb.datasource"
*
* @author Diogo Quintela
* @author Ive Hellemans
*/
public class TransferBean implements SessionBean {
/**
* @ejb.interface-method
*/
public void transferAmount(String srcAcc, String dstAcc, double amount)
throws NamingException, FinderException {
/*
InitialContext initialContext = new InitialContext();
Object objRef = initialContext.lookup(AccountLocalHome.COMP_NAME);
AccountLocalHome accLocalHome = (AccountLocalHome)
PortableRemoteObject.narrow(objRef, AccountLocalHome.class);
AccountLocal srcAccount = accLocalHome.findByPrimaryKey(srcAcc);
AccountLocal dstAccount = accLocalHome.findByPrimaryKey(dstAcc);
srcAccount.debit(amount);
dstAccount.credit(amount);
*/
}
/**
* @ejb.home-method view-type="remote"
*/
public void ejbHomeFoo() {
// dummy
}
/**
* @ejb.home-method view-type="local"
*/
public void ejbHomeOtherFoo() {
// dummy
}
public void ejbActivate() throws EJBException, RemoteException {
// nothing
}
public void ejbPassivate() throws EJBException, RemoteException {
// nothing
}
public void ejbRemove() throws EJBException, RemoteException {
// nothing
}
public void setSessionContext(SessionContext arg0) throws EJBException,
RemoteException {
// nothing
}
}
--- NEW FILE: CompanyClientBean.java ---
/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.testapp.ejb.beans;
import javax.ejb.EntityBean;
import org.xdoclet.testapp.ejb.interfaces.AccountLocal;
import org.xdoclet.testapp.ejb.interfaces.NoNumberException;
/**
* This is part of the common test application for all ejb-related
* XDoclet plugin. Vendor-specific tags should be added herein.
*
* @ejb.bean name="CompanyClient" generate="true" use-soft-locking="true"
jndi-name="jndi.CompanyClientRemote" local-jndi-name="jndi.CompanyClientLocal"
* @ejb.value-object name="Normal"
* @ejb.value-object name="Medium" match="medium"
* @ejb.value-object name="MediumStrict" match="mediumStrict" ordering="strict"
* @ejb.value-object name="MediumFullClone" match="mediumFullClone"
full-clone="true" synchronization="full"
* @ejb.value-object name="Light" match="light" synchronization="none"
*
* @weblogic.lock-order 1
* @weblogic.instance-lock-order AccessOrder
* @weblogic.use-select-for-update true
*
* @author Diogo Quintela
* @author Ive Hellemans
* @version $Revision: 1.1 $
*/
public abstract class CompanyClientBean extends BaseClientBean implements
EntityBean {
/**
* @ejb.interface-method view-type="both"
* @ejb.persistence-field
* @ejb.pk-field
* @ejb.value-object-field match="medium"
* @ejb.value-object-field match="mediumStrict"
* @ejb.value-object-field match="mediumFullClone"
*
* @return the account number
*/
public abstract String getCompanyNumber() throws NoNumberException;
/**
* @ejb.interface-method view-type="both"
* @ejb.relation name="company-main-account" target-ejb="Account"
role-name="anyrole1" target-role-name="anyrole2"
* @ejb.value-object-field match="medium"
aggregate="org.xdoclet.testapp.ejb.util.AccountValueObject"
aggregate-name="myAggrName"
* @ejb.value-object-field match="mediumStrict"
aggregate="org.xdoclet.testapp.ejb.util.AccountValueObject"
aggregate-name="myAggrName"
* @ejb.value-object-field match="mediumFullClone"
aggregate="org.xdoclet.testapp.ejb.util.AccountValueObject"
aggregate-name="myAggrName"
*
* @weblogic.relation group-name="groupA"
* @weblogic.column-map foreign-key-column="NUMBER_FK" key-column="NUMBER"
*
* @return Collection of [EMAIL PROTECTED] AccountLocal}
*/
public abstract AccountLocal getPrimaryAccount();
/**
* @ejb.interface-method view-type="both"
* @ejb.persistence-field
* @ejb.value-object-field match="medium"
* @ejb.value-object-field match="mediumStrict"
* @ejb.value-object-field match="mediumFullClone"
* @ejb.value-object-field match="light"
*/
public abstract String getCompanyName();
/**
* @ejb.interface-method view-type="both"
* @ejb.persistence-field
*/
public abstract String getCompanyFiscalNumber();
/**
* @ejb.interface-method view-type="both"
* @ejb.persistence-field
* @ejb.value-object-field match="*"
*/
public abstract String getCompanyOwnerName();
}
--- NEW FILE: AccountBean.java ---
package org.xdoclet.testapp.ejb.beans;
import org.xdoclet.testapp.ejb.interfaces.NoNumberException;
import javax.ejb.EntityBean;
import java.util.Collection;
/**
* This is part of the common test application for all ejb-related
* XDoclet plugin. Vendor-specific tags should be added herein.
*
* @author Aslak Hellesøy
* @author Diogo Quintela
* @author Ive Hellemans
* @version $Revision: 1.1 $
*
* @ejb.bean generate="true" name="Account" type="CMP" use-soft-locking="true"
primkey-field="number"
* jndi-name="jndi.AccountRemote"
local-jndi-name="jndi.AccountLocal"
*
* @ejb.pk-removed class="com.abc.AccountPK" pattern="Test{0}TestPK"
package="com.my.test.package"
* @ejb.pk role-names="admin"
*
* @ejb.finder view-type="local" description="finderDesc1"
signature="java.util.Collection findAll()"
* unchecked="true" role-names="myRole1" query="my EJBQL 1"
result-type-mapping="Local"
* transaction-type="Supports" method-intf="LocalHome"
max-elements="100"
* @ejb.finder view-type="remote" signature="java.util.Collection
findAll(int[])" unchecked="false"
* role-names="myRole2" query="my EJBQL 2"
result-type-mapping="Remote" transaction-type="Required"
* method-intf="Home"
* @ejb.finder view-type="both" description="finderDesc3"
* signature="java.util.Collection findOther(java.lang.String
param1,java.lang.Integer param2)"
* query="SELECT OBJECT(o) FROM Account o WHERE o.param1 = ?1 and
o.param2 = ?2 and o.id <> 5"
* unchecked="true" role-names="myRole3"
* @ejb.finder view-type="both" description="findWithHighestBalance"
signature="Object findWithHighestBalance()"
* unchecked="true" role-names="admin"
* @ejb.permission role-names="normal-role" view-type="both"
* @ejb.transaction type="Supports" method-intf="Remote"
*
* @ejb.interface extends="org.xdoclet.testapp.ejb.interfaces.Dummy"
*
* @ejb.persistence table-name="ACCOUNT_T"
*
* @ejb.value-object name="Account"
*
* @weblogic.cache-ref
* cache-name = "A"
* idle-timeout-seconds = "1"
* read-timeout-seconds = "2"
* concurrency-strategy="B"
* cache-between-transactions = "true"
* estimated-bean-size = 3
* @weblogic.clustering
* home-is-clusterable = true
* home-load-algorithm = x
* home-call-router-class-name = y
* use-serverside-stubs = false
* @weblogic.automatic-key-generation
* generator-type="ORACLE"
* generator-name="MY_SEQ"
* key-cache-size="1"
* @weblogic.enable-dynamic-queries
* @weblogic.data-source-name testapp-ejb.datasource
* @weblogic.delay-database-insert-until ejbPostCreate
*/
public abstract class AccountBean implements EntityBean {
/**
* @ejb.interface-method view-type="both"
* @ejb.transaction-method type="Required"
* @ejb.relation name="user-accounts" role-name="admin"
* @ejb.permission role-names="admin" view-type="both"
*
* @weblogic.relation join-table-name = "USER_ACCOUNTS"
* @weblogic.column-map foreign-key-column="ACCOUNT_FK" key-column="NUMBER"
*
* @return Collection of [EMAIL PROTECTED] ClientLocal}
*/
public abstract Collection getOwners();
/**
* @ejb.interface-method view-type="both"
* @ejb.persistence-field column-name="NUMBER_COL"
* @ejb.permission role-names="user-role" method-intf="Remote"
*
* @return the account number
*/
public abstract String getNumber()
throws NoNumberException;
/**
* Gets the type
*
* @ejb.interface-method view-type="both"
* @ejb.persistence-field column-name="TYPE_COL"
*
* @return the account type
*/
public abstract String getType();
/**
* Dummy select
*
* @ejb.select result-type-mapping="Local" query="SELECT OBJECT(o) FROM
Statement o WHERE o.value > 1000"
*/
public abstract Object ejbSelectLargeStatements();
/**
* A dummy finder
*/
public abstract Object ejbFindAccountWithBiggestStatement();
/**
* @ejb.create-method
* @ejb.permission role-names="operator,admin"
*/
public abstract Object ejbCreate(String pk);
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits