This is a language question rather than an
EJB question
Calling a method ON a class means you're executing that method as defined by the class.
Calling a method FROM a class means you're executing that method from another method defined in that class.
So when the container calls someBean.getAdvice() it's calling the getAdvice() method ON that bean (which is an instance of your AdviceBean class or another class the container generates from it at deploytime).
When your getAdvice() method than calls System.out.println() it's calling println() FROM the getAdvice() method and ON the object System.out refers to.