if I specify @TransactionAttribute on a class, but I do NOT specify @stateless or @stateful, what is the behavior ? Will this be a session bean, or will the @TransactionAttribute just be ignored. ??
@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class PhotosServiceImpl implements PhotosService
vs
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class PhotosServiceImpl implements PhotosService
Without @Stateless you can't inject it into other EJBs. If you instantiate it without doing injection, TransactionAttribute wouldn't kick in anyway.
So yes, TransactionAttribute on a non EJB class will have no effect.