hi,friends
I have looked up ejb,running in jboss, home interface successfully from delphi.However it throws IllegalAccessException when calling the the home to create the session bean.The following is my codesnippet:
...
procedure TForm1.ejbClick(Sender: TObject);
var
home,bean : OleVariant;
begin
JvmControl1.Classpath := 'd:\jboss\client\jnp-client.jar;' +
'd:\jboss\client\jboss-client.jar;' +
'd:\jboss\client\jboss-j2ee.jar;' +
'd:\jboss\client\jaas.jar;' +
'd:\jboss\client\jbosssx-client.jar;' +
'd:\cas\test\stub\bank.jar' ;
JvmControl1.StartJvm;
JBossServices1.ProviderURL := 'jnp://192.168.1.118:1099';
home := JBossServices1.LookupEjbHome(
'bank/BankBean',
'com.kf.ejb.interfaces.BankHome');
showMessage('Found bank home'); <=== it is ok here
bean := home.create(); <=== error here
showMessage('Created Bank');
showMessage(bean.getXml());
bean.remove();
showMessage('ok');
end;
...
JBossServices1 can be obtained from
Any suggestion is appreciated ! ipo_z@cmmail.com
Garbage in,Garbage out
I have looked up ejb,running in jboss, home interface successfully from delphi.However it throws IllegalAccessException when calling the the home to create the session bean.The following is my codesnippet:
...
procedure TForm1.ejbClick(Sender: TObject);
var
home,bean : OleVariant;
begin
JvmControl1.Classpath := 'd:\jboss\client\jnp-client.jar;' +
'd:\jboss\client\jboss-client.jar;' +
'd:\jboss\client\jboss-j2ee.jar;' +
'd:\jboss\client\jaas.jar;' +
'd:\jboss\client\jbosssx-client.jar;' +
'd:\cas\test\stub\bank.jar' ;
JvmControl1.StartJvm;
JBossServices1.ProviderURL := 'jnp://192.168.1.118:1099';
home := JBossServices1.LookupEjbHome(
'bank/BankBean',
'com.kf.ejb.interfaces.BankHome');
showMessage('Found bank home'); <=== it is ok here
bean := home.create(); <=== error here
showMessage('Created Bank');
showMessage(bean.getXml());
bean.remove();
showMessage('ok');
end;
...
JBossServices1 can be obtained from
Any suggestion is appreciated ! ipo_z@cmmail.com
Garbage in,Garbage out