I have an issue with JBoss where clients are connecting to an EJB (2.0) during the server
startup before JBoss has bound my jdbc connection to the EJB. This is causing some bad
issues in my bean. I've coded around it, but is this the expected behavior during
server startup? I would have thought that the EJB would not be accessible until all
<env-entry> items have been successfully bound to their respective beans.
I've searched the forums and the documentation, and have not been able to find
anything that specifically addresses this question. Is this expected behavior? Is there
some configuration parameter I can use to not allow connections to my EJB before it is
fully initialized?
Below is the relevant part of the log for my server startup.
2007-10-05 13:38:02,877 INFO :ProxyFactory.java:493 - Bound EJB Home
'ClientApiBean' to jndi 'ClientApiBean'
2007-10-05 13:38:02,887 INFO :ProxyFactory.java:493 - Bound EJB Home 'JdsInfoBean'
to jndi 'JdsInfoBean'
2007-10-05 13:38:03,107 ERROR:ClientApiBean.java:84 - javax.naming.NameNotFoundException:
jdbc not bound
2007-10-05 13:38:03,107 ERROR:ClientApiBean.java:84 - javax.naming.NameNotFoundException:
jdbc not bound
2007-10-05 13:38:03,117 INFO :EJBDeployer.java:664 - Deployed:
file:/proj/jdsdev/test_metrics/xcojdsdev4/env/Misc/jds/release/jds/server/jboss/server/jds/deploy/jdsejb.jar
2007-10-05 13:38:03,187 ERROR:ClientApiBean.java:84 - javax.naming.NameNotFoundException:
jdbc not bound
2007-10-05 13:38:03,197 ERROR:ClientApiBean.java:109 - javax.naming.NameNotFoundException:
jdbc not bound
2007-10-05 13:38:03,237 INFO :TomcatDeployer.java:126 - deploy, ctxPath=/jmx-console,
warUrl=.../deploy/jmx-console.war/
2007-10-05 13:38:03,377 ERROR:ClientApiBean.java:84 - javax.naming.NameNotFoundException:
jdbc not bound
2007-10-05 13:38:03,417 INFO :Http11BaseProtocol.java:156 - Starting Coyote HTTP/1.1 on
http-0.0.0.0-9080
2007-10-05 13:38:03,487 INFO :ChannelSocket.java:387 - JK: ajp13 listening on
/0.0.0.0:8009
2007-10-05 13:38:03,497 ERROR:ClientApiBean.java:84 - javax.naming.NameNotFoundException:
jdbc not bound
2007-10-05 13:38:03,497 INFO :JkMain.java:343 - Jk running ID=0 time=0/30 config=null
2007-10-05 13:38:03,507 INFO :ServerImpl.java:504 - JBoss (MX MicroKernel) [4.0.5.GA
(build: CVSTag=Branch_4_0 date=200610162339)] Started in 14s:371ms
The last line of the log is where I believe the Server is ready for connections (all EJBs
have had their resources bound to them). As you can see by the errors, clients are able
to lookup the ClientApiBean and perform operations on the bean before the last log line is
reached, which means that the "jdbc" entry is not yet bound to the EJB. If I
stop all clients, bring the server up, then start all clients, everything runs just
peachy.
Is this the expected startup behavior?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092163#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...