Title: SV: LDAP and EJBs

You would have one sessionbean being business delegate in front of the EntityBean manipulating the RDBMS and another managing the LDAP directory service. Then you would have a Facade in front of both these sessionbeans with one method that does the whole trick with transactional attributes set up to require a transaction before entering the method.

interface UpdatingFacade : SessionBean {
  void doTheUpdate() throws RemoteException;
}

interface LdapDelegate : SessionBean {
  void writeLdapEntry() throws RemoteException;
}

interface RdbmsDelegate : SessionBean or EntityBean {
  void writeRdbmsRow() throws RemoteException;
}

Then you want an error in the writeLdapEntry() aswell as the writeRdbmsRow() to throw an EJBException breaking the transaction begun by doTheUpdate() method. Both writeXxx methods must require that a transaction already exists before being called. The doTheUpdate() method  can really have it either way, as long as there is an active transaction associated to the thread calling it.

regards,
Patrik Andersson

-----Ursprungligt meddelande-----
Från: Joni Suominen [mailto:[EMAIL PROTECTED]]
Skickat: den 6 juli 2001 08:32
Till: Orion-Interest
Ämne: LDAP and EJBs


Hi everyone!
I have a use case where I need to interface an LDAP directory and a
relational database within a same transaction. That is, to create a new
row to RDBMS from session bean using entity bean and to create an LDAP
entry from the same session bean using Sun's LDAP provider through JNDI.

1. Is this possible?

2. Can I use container managed transactions?

Thanks a lot!

--
Joni
[EMAIL PROTECTED]

Reply via email to