In university i'm doing EJB project on Java. I have some Beans (Remote interface and it implementation, which do the main business logic). And i want to print some debugging text\information. For example:
@Stateless(mappedName = "BusinessLogicBean") // имя, по которому можно обращаться к этому бину извне)
public class BusinessLogicSessionBean implements BusinessLogicSessionBeanRemote, BusinessLogicSessionBeanLocal {
@PersistenceContext(unitName = "FoodDiary-ejbPU")
private EntityManager em;
@Override
public void addNewProduct(String name, Boolean isProducr, String kkal, String prot, String fat, String carb) {
System.out.printl("Now we are running method ADD NEW PRODUCT");
....
}
But when I use all methods - they are doing all business logic, but doesn't PRINT anywhere my phrase (which i'm writing with SOUT). I'm looked in Glassfish log, in log if executing my program - and there is nothing.
Could anyone tell - how can I print my information from Session Beans ?
Try to use debugger to make shure your System.out.println reached by app. Generally it looks ok.