Hi All,
I am using Xdoclet to generate the home and remote interface, but the remote interface generated does not contain any method that is defined in bean class and also the generated home interface is not extending the any other interface.
I am copying the code below::::
#############################
my ConsolidatedClaimBean.java class is:
/**
* @ejb.bean type="Stateless"
* name="ConsolidatedClaim"
* jndi-name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/ConsolidatedClaim"
* view-type="both"
*
* @ejb.home extends="com.hp.tiscon.eclaims.financial.service.persistence.api.claim.ConsolidatedClaimInterface"
* @ejb.transaction type="Required"
*/
// @FileGeneration(remoteClass = Constants.Bool.TRUE,
// remoteHome = Constants.Bool.TRUE,
// remoteClassName = "ConsolidatedClaim",
// remoteHomeName = "ConsolidatedClaimHome")
// @JndiName(remote = "com/hp/tiscon/eclaims/financial/service/persistence/api/claim/ConsolidatedClaim")
// @Session(type = Session.SessionType.STATELESS,
// maxBeansInFreePool = "100",
// defaultTransaction = Constants.TransactionAttribute.REQUIRED,
// ejbName = "ConsolidatedClaim",
// transactionType = Session.SessionTransactionType.CONTAINER,
// enableCallByReference = Constants.Bool.TRUE)
public class ConsolidatedClaimBean extends ClaimBean implements SessionBean {
private SessionContext ctx;
public void setSessionContext(SessionContext context) {
ctx = context;
}
public void ejbActivate() {
}
public void ejbPassivate() {
}
public void ejbRemove() {
}
public void ejbCreate() {
}
protected
String getDataSourceName() throws PersistenceServiceException {
PersistenceProperties persistenceProperties = PersistenceProperties.getInstance();
return persistenceProperties.getProperty(PersistenceProperties.KEY_DATA_SOURCE_NAME_CLAIM);
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public VDealIdInfo[] loadDealIdInfo(String dealId)throws RemoteException, PersistenceServiceException {
if((dealId == null) || dealId.length() == 0){
return null;
}
SortedMap whereCriteria = new TreeMap();
whereCriteria.put("dealId", dealId);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceName());
List dealIdList = persister.select(VDealIdInfo.class, whereCriteria);
if (dealIdList.size() == 0) {
return null;
} else {
return (VDealIdInfo[]) dealIdList.toArray(new VDealIdInfo[dealIdList.size()]);
}
} catch (PersisterException e) {
Log4jWrapper.getLog(getClass()).error("Can not load VDealIdInfo from data source '" + getDataSourceName());
throw new PersistenceServiceException("Can not load VDealIdInfo from data source '" + getDataSourceName() + "'. " + e.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public VRecentEnteredRecats loadRecentEnteredClaims(String customerBaseNr, String partnerOpgCode, Date partnerSoStart, Date partnerSoEnd) throws RemoteException, PersistenceServiceException {
if (customerBaseNr == null || customerBaseNr.length() == 0) {
Log4jWrapper.getLog(getClass()).error("No customer_base_nr given ...!");
return null;
}
if (partnerOpgCode == null || partnerOpgCode.length() == 0) {
Log4jWrapper.getLog(getClass()).error("No partnerOpgCode given ...!");
return null;
}
if (partnerSoStart == null) {
Log4jWrapper.getLog(getClass()).error("No partnerSoStart given ...!");
return null;
}
if (partnerSoEnd == null) {
Log4jWrapper.getLog(getClass()).error("No partnerSoEnd given ...!");
return null;
}
SortedMap whereCriteria = new TreeMap();
whereCriteria.put("customerBaseNr", customerBaseNr);
whereCriteria.put("partnerOpgCode", partnerOpgCode);
whereCriteria.put("partnerSoStart", partnerSoStart);
whereCriteria.put("partnerSoEnd", partnerSoEnd);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceName());
List allRecentEnteredRecats = persister.select(VRecentEnteredRecats.class, whereCriteria);
if (allRecentEnteredRecats.size() == 0) {
return null;
} else {
return (VRecentEnteredRecats) allRecentEnteredRecats.toArray(new VRecentEnteredRecats[allRecentEnteredRecats.size()])[0];
}
} catch (PersisterException e) {
Log4jWrapper.getLog(getClass()).error("Can not load VRecentEnteredRecats from data source '" + getDataSourceName());
throw new PersistenceServiceException("Can not load VRecentEnteredRecats from data source '" + getDataSourceName() + "'. " + e.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public VRecentEnteredFlashRecats[] loadRecentEnteredClaimItems(String customerBaseNr, String partnerOpgCode, Date partnerSoStart, Date partnerSoEnd) throws RemoteException, PersistenceServiceException {
if (customerBaseNr == null || customerBaseNr.length() == 0) {
Log4jWrapper.getLog(getClass()).error("No customer_base_nr given ...!");
return null;
}
if (partnerOpgCode == null || partnerOpgCode.length() == 0) {
Log4jWrapper.getLog(getClass()).error("No partnerOpgCode given ...!");
return null;
}
if (partnerSoStart == null) {
Log4jWrapper.getLog(getClass()).error("No partnerSoStart given ...!");
return null;
}
if (partnerSoEnd == null) {
Log4jWrapper.getLog(getClass()).error("No partnerSoEnd given ...!");
return null;
}
SortedMap whereCriteria = new TreeMap();
whereCriteria.put("customerBaseNr", customerBaseNr);
whereCriteria.put("partnerOpgCode", partnerOpgCode);
whereCriteria.put("partnerSoStart", partnerSoStart);
whereCriteria.put("partnerSoEnd", partnerSoEnd);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceName());
List allRecentEnteredRecats = persister.select(VRecentEnteredFlashRecats.class, whereCriteria);
if (allRecentEnteredRecats.size() == 0) {
return null;
} else {
return (VRecentEnteredFlashRecats[]) allRecentEnteredRecats.toArray(new VRecentEnteredFlashRecats[allRecentEnteredRecats.size()]);
}
} catch (PersisterException e) {
Log4jWrapper.getLog(getClass()).error("Can not load VRecentEnteredRecats from data source '" + getDataSourceName());
throw new PersistenceServiceException("Can not load VRecentEnteredRecats from data source '" + getDataSourceName() + "'. " + e.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public void updateClaim(com.hp.tiscon.eclaims.financial.model.Claim claim) throws PersistenceServiceException, RemoteException {
deleteClaim(claim);
insertClaim(claim);
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public IsoHpCurrencyXref getIsoHpCurrenyXref(String currencyIso) throws RemoteException, PersistenceServiceException {
if (currencyIso == null) {
return null;
}
SortedMap currenyCriteria = new TreeMap();
currenyCriteria.put("currencyIso", currencyIso);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceName());
List currenyList = persister.select(com.hp.tiscon.eclaims.financial.model.IsoHpCurrencyXref.class, currenyCriteria);
if (currenyList.size() > 0) {
IsoHpCurrencyXref[] isoHpCurrencyXref = (IsoHpCurrencyXref[]) currenyList.toArray(new IsoHpCurrencyXref[currenyList.size()]);
return isoHpCurrencyXref[0];
} else {
Log4jWrapper.getLog(getClass()).info("no IsoHpCurrencyXref found for currency " + currencyIso);
return null;
}
} catch (PersisterException ex) {
throw new PersistenceServiceException("Can not load data from data source '" + getDataSourceName() + "'. " + ex.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public Long getTat(String claimId) throws PersistenceServiceException, RemoteException{
if(claimId==null){
return new Long(0);
}
Connection connection = null;
Long tat = new Long(0);
try {
connection = PersisterFactory.getPersister(getDataSourceName()).getDataSource().getConnection();
CallableStatement statement = connection.prepareCall("{? = call calculate_tat(?)}");
statement.registerOutParameter(1,Types.NUMERIC);
statement.setString(2,claimId);
ResultSet rs = statement.executeQuery();
tat = new Long(statement.getLong(1));
if(statement.wasNull()){
Log4jWrapper.getLog(getClass()).warn("tat is null for " + claimId);
}else{
Log4jWrapper.getLog(getClass()).info("return tat " + tat + " for " + claimId);
}
rs.close();
statement.close();
return tat;
} catch (PersisterException ex) {
throw new PersistenceServiceException("Can not load data from data source '" + getDataSourceName() + "'. " + ex.getMessage());
} catch (SQLException e) {
throw new PersistenceServiceException("Can not load data from data source '" + getDataSourceName() + "'. " + e.getMessage());
}finally{
try {
connection.close();
} catch (SQLException e) {
throw new PersistenceServiceException("Could not close connection to db." + e);
}
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public Long getOverallTat(String claimId) throws PersistenceServiceException, RemoteException{
if(claimId==null){
return new Long(0);
}
Connection connection = null;
Long tat = new Long(0);
try {
connection = PersisterFactory.getPersister(getDataSourceName()).getDataSource().getConnection();
CallableStatement statement = connection.prepareCall("{? = call calculate_overall_tat(?)}");
statement.registerOutParameter(1,Types.NUMERIC);
statement.setString(2,claimId);
ResultSet rs = statement.executeQuery();
tat = new Long(statement.getLong(1));
if(statement.wasNull()){
Log4jWrapper.getLog(getClass()).warn("Overall tat is null for " + claimId);
}else{
Log4jWrapper.getLog(getClass()).info("return tat " + tat + " for " + claimId);
}
rs.close();
statement.close();
return tat;
} catch (PersisterException ex) {
throw new PersistenceServiceException("Can not load data from data source '" + getDataSourceName() + "'. " + ex.getMessage());
} catch (SQLException e) {
throw new PersistenceServiceException("Can not load data from data source '" + getDataSourceName() + "'. " + e.getMessage());
}finally{
try {
connection.close();
} catch (SQLException e) {
throw new PersistenceServiceException("Could not close connection to db." + e);
}
}
}
/**
* @ejb.transaction type="RequiresNew"
* @ejb.interface-method view-type="remote"
*
* @param warningValidation
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void addWarning(com.hp.tiscon.eclaims.financial.model.WarningValidation warningValidation) throws PersistenceServiceException, RemoteException {
if (warningValidation == null) {
return;
}
try {
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
persister.insert(warningValidation);
} catch (PersisterException ex) {
throw new PersistenceServiceException("Can not save data to '" + getDataSourceNamePreclaim() +
"'. " + ex.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public List findWarning(com.hp.tiscon.eclaims.financial.model.WarningValidation warningValidation) throws PersistenceServiceException, RemoteException {
String claimId = warningValidation.getClaimId();
String warningType = warningValidation.getWarningType();
String preclaimId = warningValidation.getPreclaimId();
if ((claimId == null) || (preclaimId == null) || (warningType == null)) {
return null;
}
SortedMap whereCriteria = new TreeMap();
whereCriteria.put("claimId", claimId);
whereCriteria.put("preclaimId", preclaimId);
whereCriteria.put("warningType", warningType);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
List retList = persister.select(WarningValidation.class, whereCriteria);
if (retList.size() == 0) {
return null;
} else {
return retList;
}
} catch (PersisterException ex) {
throw new PersistenceServiceException("Can not read data from '" + getDataSourceNamePreclaim() +
"'. " + ex.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public void deleteWarning(String claimId, String warningType) throws PersistenceServiceException, RemoteException {
if ((claimId == null) || (warningType == null)) {
return;
}
SortedMap whereCriteria = new TreeMap();
whereCriteria.put("claimId", claimId);
whereCriteria.put("warningType", warningType);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
persister.delete(WarningValidation.class, whereCriteria);
} catch (PersisterException ex) {
throw new PersistenceServiceException("Can not save data to '" + getDataSourceNamePreclaim() +
"'. " + ex.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public void insertSuccessfulActivity(SuccessfulActivity pSuccessfulActivity) throws PersistenceServiceException, RemoteException {
try {
Log4jWrapper.getLog(getClass()).info("get persistor");
Persister persister = PersisterFactory.getPersister(getDataSourceNameFclaim());
if (pSuccessfulActivity != null) {
Log4jWrapper.getLog(getClass()).info("successfulActivity");
persister.insert(pSuccessfulActivity);
}
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("comment: ", ex);
throw new PersistenceServiceException(ex.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public SuccessfulActivity[] loadSuccessfulActivity(String pClaimId, String pActivity) throws PersistenceServiceException, RemoteException {
try {
Log4jWrapper.getLog(getClass()).info("start:");
SortedMap criteria = new TreeMap();
criteria.put("claimId", pClaimId);
criteria.put("activity", pActivity);
Persister persister = PersisterFactory.getPersister(getDataSourceNameFclaim());
List result = persister.select(SuccessfulActivity.class, criteria);
SuccessfulActivity[] activities = null;
if (result.size() > 0) {
activities = (SuccessfulActivity[]) result.toArray(new SuccessfulActivity[result.size()]);
}
Log4jWrapper.getLog(getClass()).info("end:");
return activities;
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error(ex.getClass().getName() + ": ", ex);
throw new PersistenceServiceException("Could not load successfulActivity data from db. " + ex.getMessage());
}
}
/**
* @ejb.interface-method view-type="remote"
*
*/
//@RemoteMethod
public void deleteSuccessfulActivity(String pClaimId, String pActivity) throws PersistenceServiceException, RemoteException {
SortedMap criteria = new TreeMap();
criteria.put("claimId", pClaimId);
criteria.put("activity", pActivity);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceName());
persister.delete(SuccessfulActivity.class, criteria);
} catch (PersisterException ex) {
throw new PersistenceServiceException("Can not delete data from data source '" + getDataSourceName() +
"'. " + ex.getMessage());
}
}
/**
* Insert a new uploadStatus object in preclaim. Additionally a the preclaim object is updated,
* which holds a reference to the uploadStatus object. This is needed to ensure that the
* status <strong>and</strong> the status reference in preclaim are saved, even if the calling
* transaction is rolledback.
*
* @ejb.transaction type="RequiresNew"
* @ejb.interface-method view-type="remote"
*
* @param status the uploadStatus
* @param preclaim the preclaim object, with the reference to the status
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void insertUploadStatus(com.hp.tiscon.eclaims.financial.model.UploadStatus status,com.hp.tiscon.eclaims.financial.model.Preclaim preclaim) throws PersistenceServiceException, RemoteException{
insertUploadStatus(status);
try {
com.hp.tiscon.eclaims.financial.service.persistence.api.claim.Preclaim preclaimBean =
(com.hp.tiscon.eclaims.financial.service.persistence.api.claim.Preclaim)
EJBUtil.getInstance().createRemoteObject(PreclaimHome.class);
preclaimBean.delete(preclaim);
preclaimBean.insert(preclaim);
} catch (EJBWrapperException e) {
Log4jWrapper.getLog(getClass()).error("Could not insert preclaim: ", e);
throw new PersistenceServiceException("Could not insert preclaim: " + e.getMessage());
}
}
/**
* Helper method to Insert a new uploadStatus object in preclaim.
*
*
* @param status the uploadStatus
* @throws PersistenceServiceException
*/
protected void insertUploadStatus(com.hp.tiscon.eclaims.financial.model.UploadStatus status) throws PersistenceServiceException {
try {
Log4jWrapper.getLog(getClass()).info("start");
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
if (status != null) {
Log4jWrapper.getLog(getClass()).info("insert upload status");
persister.insert(status);
} else {
Log4jWrapper.getLog(getClass()).warn("uploadStatus is null");
}
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("Could not insert uploadStatus: ", ex);
throw new PersistenceServiceException("Could not insert uploadStatus: " + ex.getMessage());
}
}
/**
* Retrieve a uploadStatus object from preclaim for the given uploadId.
*
* @ejb.interface-method view-type="remote"
*
* @param uploadId
* @return the uploadStatus object or null if not found.
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod
public UploadStatus loadUploadStatus(String uploadId)throws PersistenceServiceException, RemoteException{
try {
Log4jWrapper.getLog(getClass()).info("start:");
if( (uploadId == null) || (uploadId.length()==0)){
Log4jWrapper.getLog(getClass()).warn("uploadId is null.");
return null;
}
SortedMap criteria = new TreeMap();
criteria.put("uploadId", uploadId);
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
List result = persister.select(UploadStatus.class, criteria);
UploadStatus status = null;
if (result.size() > 0) {
status = (UploadStatus)result.get(0);
}else{
Log4jWrapper.getLog(getClass()).info("No upload status found");
}
Log4jWrapper.getLog(getClass()).info("end:");
return status;
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("Could not load uploadStatus", ex);
throw new PersistenceServiceException("Could not load uploadStatus: " + ex.getMessage());
}
}
/**
* Delete the uploadStatus in preclaim with the given uploadId
*
* @ejb.interface-method view-type="remote"
* @ejb.transaction type="RequiresNew"
*
* @param uploadId
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void deleteUploadStatus(String uploadId)throws PersistenceServiceException, RemoteException{
if( (uploadId == null) || (uploadId.length()==0)){
Log4jWrapper.getLog(getClass()).warn("uploadId is null.");
return;
}
SortedMap whereCriteria = new TreeMap();
whereCriteria.put("uploadId", uploadId);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
persister.delete(UploadStatus.class, whereCriteria);
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("Could not delete uploadStatus",ex);
throw new PersistenceServiceException("Could not delete uploadStatus: " +ex.getMessage());
}
}
/**
* Delete the uploadValidationError in preclaim with the given uploadId
*
* @ejb.interface-method view-type="remote"
* @ejb.transaction type="RequiresNew"
*
* @param uploadId
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void deleteUploadValidationError(String uploadId) throws PersistenceServiceException, RemoteException {
if ((uploadId == null) || (uploadId.length() == 0)) {
Log4jWrapper.getLog(getClass()).warn("uploadId is null.");
return;
}
SortedMap whereCriteria = new TreeMap();
whereCriteria.put("uploadId", uploadId);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
persister.delete(UploadValidationError.class, whereCriteria);
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("Could not delete uploadStatus", ex);
throw new PersistenceServiceException("Could not delete uploadStatus: " + ex.getMessage());
}
}
/**
* Delete and insert the given uploadStatus on preclaim.
* @ejb.transaction type="RequiresNew"
* @ejb.interface-method view-type="remote"
*
* @param status
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void updateUploadStatus(com.hp.tiscon.eclaims.financial.model.UploadStatus status)throws PersistenceServiceException, RemoteException{
if(status == null){
Log4jWrapper.getLog(getClass()).warn("uploadStatus is null");
}
deleteUploadStatus(status.getUploadId());
insertUploadStatus(status);
}
/**
* Retrieve the uploadStatus for the given uploadId.
* Additionally retrieve the uploadValidationError objects for the uploadId and add them to
* uploadStatus.
*
* @ejb.interface-method view-type="remote"
*
* @param uploadId
* @return the uploadStatus or null if no status found for the given id.
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod
public UploadStatus loadUploadStatusWithValidationErrors(String uploadId)throws PersistenceServiceException, RemoteException{
Log4jWrapper.getLog(getClass()).info("start:");
if( (uploadId == null) || (uploadId.length()==0)){
Log4jWrapper.getLog(getClass()).warn("uploadId is null.");
return null;
}
UploadStatus status = loadUploadStatus(uploadId);
if(status != null){
status.setValidationErrors(loadUploadValidationErrors(uploadId));
}
Log4jWrapper.getLog(getClass()).info("end:");
return status;
}
/**
* Retrieve the uploadValidationErrors for the given uploadId.
*
* @ejb.interface-method view-type="remote"
*
* @param uploadId
* @return the uploadValidationErrors or null if no errors where found for the given id.
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod
public UploadValidationError[] loadUploadValidationErrors(String uploadId) throws PersistenceServiceException{
Log4jWrapper.getLog(getClass()).debug("start");
if( (uploadId == null)){
Log4jWrapper.getLog(getClass()).warn("uploadId is null.");
return null;
}
UploadValidationError[] errors= null;
try{
SortedMap criteria = new TreeMap();
criteria.put("uploadId", uploadId);
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
List result = persister.select(UploadValidationError.class, criteria);
if (result.size() > 0) {
Log4jWrapper.getLog(getClass()).info("Found "+result.size()+" Validation Errors ");
errors = (UploadValidationError[])result.toArray(new UploadValidationError[result.size()]);
}
}catch(PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("Could not load uploadValiationErrors", ex);
throw new PersistenceServiceException("Could not load uploadValidationErrors: " + ex.getMessage());
}
Log4jWrapper.getLog(getClass()).debug("end");
return errors;
}
/**
* @ejb.transaction type="RequiresNew"
* @ejb.interface-method view-type="remote"
*
* @param error
* @throws PersistenceServiceException
* @throws RemoteException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void insertUploadValidationError(com.hp.tiscon.eclaims.financial.model.UploadValidationError error) throws PersistenceServiceException, RemoteException {
try {
Log4jWrapper.getLog(getClass()).info("start");
Persister persister = PersisterFactory.getPersister(getDataSourceNamePreclaim());
if (error != null) {
Log4jWrapper.getLog(getClass()).info("insert upload validation error " + error.getErrorId());
persister.insert(error);
}else{
Log4jWrapper.getLog(getClass()).warn("uploadValidationError is null");
}
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("Could not insert uploadValidationError: ", ex);
throw new PersistenceServiceException("Could not insert uploadValidationError: " + ex.getMessage());
}
}
/**
* @ejb.transaction type="RequiresNew"
* @ejb.interface-method view-type="remote"
*
* @param partnerName
* @param uploadDate
* @param cbn
* @throws PersistenceServiceException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void logOldClaimSheet(String partnerName, Date uploadDate, String cbn) throws PersistenceServiceException, RemoteException {
OldSheetLog oldSheetLog = new OldSheetLog();
oldSheetLog.setPartnerName(partnerName);
oldSheetLog.setUploadDate(uploadDate);
oldSheetLog.setCbn(cbn);
try {
Persister persister = PersisterFactory.getPersister(getDataSourceNameFclaim());
Log4jWrapper.getLog(getClass()).info("insert old sheet log");
persister.insert(oldSheetLog);
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("Could not insert old sheet log: ", ex);
throw new PersistenceServiceException("Could not insert old sheet log: " + ex.getMessage());
}
}
/**
* @ejb.transaction type="RequiresNew"
* @ejb.interface-method view-type="remote"
*
* @param corrections
* @throws PersistenceServiceException
*/
//@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.REQUIRES_NEW)
public void insertCreditCorrectionForClaimItems(com.hp.tiscon.eclaims.financial.model.CreditCorrForClaimItem[] corrections) throws PersistenceServiceException, RemoteException {
try {
Persister persistor = PersisterFactory.getPersister(getDataSourceName());
if (corrections != null) {
for (int i = 0; i < corrections.length; i++) {
persistor.insert(corrections[i]);
}
}
} catch (PersisterException ex) {
Log4jWrapper.getLog(getClass()).error("comment: ", ex);
throw new PersistenceServiceException(ex.getMessage());
}
}
}
########################
ConsolidatedClaimInterface.java is::::
public interface ConsolidatedClaimInterface {
public static final String JNDI_NAME = "com/hp/tiscon/eclaims/financial/service/persistence/api/claim/ConsolidatedClaim";
}
###################
The generated home interface ConsolidatedClaimHome.java is:::
public interface ConsolidatedClaimHome
extends javax.ejb.EJBHome
{
public static final String COMP_NAME="
java:comp/env/ejb/ConsolidatedClaim";
public static final String JNDI_NAME="ConsolidatedClaim";
public com.hp.tiscon.eclaims.financial.service.persistence.api.claim.ConsolidatedClaim create()
throws javax.ejb.CreateException,java.rmi.RemoteException;
}
The generated remote interface ConsolidatedClaim.java is:::
/*
* Generated by XDoclet - Do not edit!
*/
package com.hp.tiscon.eclaims.financial.service.persistence.api.claim;
/**
* Remote interface for ConsolidatedClaim.
*/
public interface ConsolidatedClaim
extends javax.ejb.EJBObject
{
}
#######
The generated home interface is not extending the interface "com.hp.tiscon.eclaims.financial.service.persistence.api.claim.ConsolidatedClaimInterface" and also it containing the JNDI_NAME="ConsolidatedClaim" but in ConsolidatedClaimBean.java class has jndi name "com/hp/tiscon/eclaims/financial/service/persistence/api/claim/ConsolidatedClaim".
The generated remote interface does not containing any business method but i have used below annotation for the business method:
/**
* @ejb.interface-method view-type="remote"
*
*/.
###################
My build.xml portion is:::
<target name="generateejbfile" description="generate deployment descriptors"
depends="create.dir,generate_gsmodel, generate_wsmodel">
<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="xdoclet.classpath" />
<ejbdoclet destdir="${dir.source.generated}" excludedtags="@version,@author" ejbspec="2.0" verbose="${debug}" mergedir="${dir.conf.xdoclet}" force="true">
<fileset dir="${dir.source}">
<include name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/persistence/api/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/persistence/api/profile/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/persistence/api/user/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/util/FinancialConfigurationWrapperBean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/claim/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/invoicechk/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/profile/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/worker/WorkerBean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/maintenance/MaintenanceBean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/claim/flash/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/businesslogic/claim/flash/persistence/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/mail/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/creditadapter/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/eoi/api/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/creditadapter/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/gpsy/api/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/processmanager/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/processmanager/workflowabstraction/processmanager/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/recat/api/*Bean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/snt/SntServiceFacadeBean.java" />
<include name="com/hp/tiscon/eclaims/financial/service/integration/snt/*ejb.java" />
<!-- Removing duplicate java classes -->
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/GenericClaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/IppArchiveJoinerBean.java" />
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/IppClaimForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/IppClaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/IppPreclaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogicclaim/ManualArchiveJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/ManualClaimForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/ManualClaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/ManualPreclaimForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/ManualPreclaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/RecatClaimForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/RecatPreclaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/RecatSingleArchiveJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/RecatSingleClaimForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/RecatSingleClaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/RecatSinglePreclaimForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/RecatSinglePreclaimJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/SearchArchiveJoiner.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/IppPreclaimForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/ManualArchiveJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/SearchArchiveJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/SearchForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/claim/SearchJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/invoicechk/RlbClaimValidatorBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/profile/ProfileForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/profile/ProfileJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/profile/SearchForkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/profile/SearchJoinerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/businesslogic/worker/WorkerBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/integration/eoi/api/EoiAdapterBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/integration/gpsy/api/GpsyAdapterBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/integration/processmanager/ProcessManagerAdapterBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/integration/recat/api/RecatAdapterBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/ProtocolBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/ReplenisherResourceBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/IppArchiveBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/IppClaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/ManualArchiveBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/ManualClaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/ManualPreclaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/PreclaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/RecatClaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/RecatPreclaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/RecatSingleArchiveBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/RecatSingleClaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/RecatSinglePreclaimBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/SearchBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/SearchArchiveBean.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/profile/ProfileBean.java"/>
<!-- Below three lines are causing duplicate class-->
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/claim/IppPreclaimHome.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/profile/Search.java"/>
<exclude name="com/hp/tiscon/eclaims/financial/service/persistence/api/profile/SearchHome.java"/>
</fileset>
<remoteinterface />
<homeinterface />
<deploymentdescriptor destdir="${dir.source.generated}" validatexml="false"/>
<
jboss destDir="${dir.source.generated}" version="4.0"/>
</ejbdoclet>
</target>
###############
Please help me to find out the root cause.
Regards
Sanjeev Kumar