Hi there
I am getting a real funny error when using JBoss 2.1.1 together with
PostGreSQL 7.1.1
I have two CMP entity beans EFiler + TaxPayer the EFiler bean can add some
Efilers, so it has a method called,
addTaxPayers(TaxPayerData data), this method will create a TaxPayer linked
to the specific EFiler. All Works FINE still!
Now I've got a normal class wrapping all this functionality called
RegistrationService which has a method called
registerNewTaxPayer(data) which take enough information to add a TaxPayer
for a specific EFiler. This still works fine !!!
But now if I wrap the RegistrationService object service in a Stateless
Session Bean funny things start happening !!!!
Referring to the code :
The addTaxPayerNoSession method going straight to the Entity bean
The addTaxPayer method going via a stateless session bean, transaction
RequiresNew
After executing the code and listing the contents of the beans I would
suspect to see
TaxPayerName : vv2
TaxPayerName : vv3
TaxPayerName : uu2
TaxPayerName : uu3
But I get :
TaxPayerName : vv2
TaxPayerName : vv3
TaxPayerName : uu3
TaxPayerName : uu3
If first execute addTaxPayer and addTaxPayerNoSession last then
everything is fine !!!
It looks to me like some Transaction problem.
Any Ideas ?
I saw an old post that report the same behaviour but no awnser there
!!!!!
http://www.mail-archive.com/[email protected]/msg12753.html
This is my test scenario's
code start.....
TaxPayerData d1 = new
TaxPayerData(3,1,"vv22","vv22","vv22","vv22");
TaxPayerData d2 = new
TaxPayerData(4,1,"vv33","vv33","vv33","vv33");
TaxPayerData d3 = new
TaxPayerData(5,1,"uu22","uu22","uu22","uu22");
TaxPayerData d4 = new
TaxPayerData(6,1,"uu33","uu33","uu33","uu33");
TaxPayerForm form3 = new TaxPayerForm(d3);
addTaxPayerNoSession(form3);
TaxPayerForm form4 = new TaxPayerForm(d4);
addTaxPayerNoSession(form4);
TaxPayerForm form1 = new TaxPayerForm(d1);
addTaxPayer(form1);
TaxPayerForm form2 = new TaxPayerForm(d2);
addTaxPayer(form2);
private void addTaxPayer(TaxPayerForm form) throws Exception{
EFilerSessionHome home =
(EFilerSessionHome)EJBUtil.getBeanHome(EFilerSessionHome.JNDI_NAME,
"andre_v", "password");
EFilerSession session = home.create();
session.registerNewTaxPayer("andre_v", form);
}
private void addTaxPayerNoSession(TaxPayerForm form) throws
Exception{
EFilerSessionHome home =
(EFilerSessionHome)EJBUtil.getBeanHome(EFilerSessionHome.JNDI_NAME,
"andre_v", "password");
RegistrationService service = new RegistrationService();
service.registerNewTaxPayer("andre_v", form);
}
code end.....
**********************************************************************
The information in this e-mail is confidential and is legally privileged.
It is intended solely for the addressee. If this email is not intended for
you, you cannot copy, distribute, or disclose the included information
to any-one
If you are not the intended recipient please delete the mail. Whilst
all reasonable steps have been taken to ensure the accuracy and
integrity of all data transmitted electronically, no liability is accepted
if the data, for whatever reason, is corrupt or does not reach it's
intended destination.
All business is undertaken, subject to our standard trading conditions
which are available on request.
*******************************************************************
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user