I recently noticed in objects with compound primary keys only one key field is used to identify the entity bean reference in the container. For example:
// given I have an accountBeanRef to an entity with an pk(id = 145, createDate = 1016009775867)
// result: atm/ejb/accountEJB:145
I presume that is is the result of the accountBeanRef.toString() as well. I think a more elegant solution would be to concat all the values of all the fields together, such as:
// result atm/ejb/accountEJB:145_1016009775867
Food for thought.
You lost me here. What are you trying to print? Is it the pk object? Are you using JAWS or JBossCMP?