SessionBean - ID

3 respostas
M

oi,
No sessionbean (statefull) existe algum id ou outra coisa que eu possa estar identificando-o ?
Se sim, como seria ?

valeu.

3 Respostas

cv1

O que, exatamente, vc quer identificar? A instancia do session bean?

ozielneto

Os EJBs não tem IDs.
Entrentanto EntiyBeans teem PK…
SessionBeans, não ha controle padronizado na J2EE API.
MessageDrivenBeans, não ha controle padronizado na J2EE API.

A partir da EJBHome posso obte o EJBMetaData que tem poucos metodos.

EJBHome getEJBHome()
Obtain the remote home interface of the enterprise Bean.

java.lang.Class getHomeInterfaceClass()
Obtain the Class object for the enterprise Bean’s remote home interface.

java.lang.Class getPrimaryKeyClass()
Obtain the Class object for the enterprise Bean’s primary key class.

java.lang.Class getRemoteInterfaceClass()
Obtain the Class object for the enterprise Bean’s remote interface.

boolean isSession()
Test if the enterprise Bean’s type is “session”.

boolean isStatelessSession()
Test if the enterprise Bean’s type is “stateless session”.

A Interface EJBObject tem

public boolean isIdentical(EJBObject obj)
throws java.rmi.RemoteExceptionTest if a given EJB object is identical to the invoked EJB object.

O que voce quer fazer??

[]'s

Paulo_Silveira

Use o metodo getHandle da interface EJBObject/LocalObject.
Eh como uma referencia persistente, como uma IOR do Corba.

Criado 25 de agosto de 2003
Ultima resposta 25 de ago. de 2003
Respostas 3
Participantes 4