[jboss-user] [EJB 3.0] - Re: EJB3 Lazy Load problem

zilbi do-not-reply at jboss.com
Thu Mar 13 12:10:54 EDT 2008


there you go:

  | @Stateless
  | @Remote(ContactsInviter.class)
  | @SecurityDomain("jinni")
  | public class ContactsInviterImpl implements ContactsInviter
  | {
  | 	private static final Log log = LogFactory.getLog(ContactsInviterImpl.class);
  | 	
  | 	@EJB
  | 	private CollectionDao dao;
  | 	
  | 	@TransactionAttribute(TransactionAttributeType.REQUIRED)
  | 	public List<ExternalContact> fetchContacts(String email, String password) throws ExternalProfileException
  | 	{
  | 		log.debug("fetchContacts() - starting with email: " + email + " with password: " + password);
  | 		try
  | 		{
  | 			// some non relevant code here...
  | 
  | 			Collection collection = dao.findById( 1L );
  | 			log.debug("fetchContacts() - caller: " + collection.getContents().size());	    		    	
  | 			
  | 			// some more non relevant code here...
  | 		}
  | 		catch (Exception e)
  | 		{	
  | 			String errMsg = "failed to fetch contacts for email: " + email + " with password: " + password + " due to: " + e.getMessage();
  | 			log.error("fetchContacts() - " + errMsg, e);
  | 			throw new ExternalProfileException( e );
  | 		}
  | 	}
  | 
  | 	// some more methods...
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136362#4136362

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136362



More information about the jboss-user mailing list