-
15. Re: Hey I want simple steps to run an ejb sample application?
swaroopp Aug 17, 2010 8:46 AM (in response to jaikiran)about to look up jndi name MyBean/remote
log4j:WARN No appenders could be found for logger (org.jnp.interfaces.TimedSocketFactory).
log4j:WARN Please initialize the log4j system properly.
finished lookup
I am not getting any exception but bean's method is not invoked
about to look up jndi name MyBean/remote
log4j:WARN No appenders could be found for logger (org.jnp.interfaces.TimedSocketFactory).
log4j:WARN Please initialize the log4j system properly.
finished lookup
I am not getting any exception but bean's method is not invoked
-
Copy of SampleEJBProject.zip 9.0 KB
-
-
16. Re: Hey I want simple steps to run an ejb sample application?
jaikiran Aug 17, 2010 8:59 AM (in response to swaroopp)Please do not keep repeating the same message in a new post, every few minutes.
swaroop kumar wrote:
about to look up jndi name MyBean/remote
log4j:WARN No appenders could be found for logger (org.jnp.interfaces.TimedSocketFactory).
log4j:WARN Please initialize the log4j system properly.
finished lookup
I am not getting any exception but bean's method is not invoked
That's not true. The bean's method is being invoked:
System.out.println("about to look up jndi name " + jndiName); MyBeanRemote beanRemote = (com.myeclipse.ejb3.MyBeanRemote) context.lookup(jndiName); beanRemote.doSomething(); System.out.println("finished lookup");
You wouldn't have seen the "finished lookup" in the logs if the bean method wasn't invoked. Why do you think the bean's method is not invoked? Do you have a System.out.println in the bean's method and you expect it to appear before the "finished lookup" message? That's not going to happen because the message from the bean will be logged on the server side. So you will have to check the server's console or the server.log file for the message from the bean.
P.S: I would have advised you to format your posts for better reading, but given the weirdness of the forum editor software and no preview option, I can't ask much.
-
17. Re: Hey I want simple steps to run an ejb sample application?
swaroopp Aug 18, 2010 1:49 AM (in response to jaikiran)Actually i Have a system.out.pritnln in my beans method and i expect it to print in the same console but i was wrong it is printed in the server's console..
Thank you very much to be in part of my discussion ..i rated u for the correct answer...and i was struggling for this simple issue...
Thanks once again friend
-
18. Re: Hey I want simple steps to run an ejb sample application?
wolfgangknauf Aug 18, 2010 8:16 AM (in response to swaroopp)Sometimes very simple things make life very difficult ;-)
Best regards
Wolfgang