JCA chap7 NoTransFS questioning?
jaba_o Apr 9, 2005 3:47 AMHi!
I'm having jboss 4 series AS installed with embedded tomcat VM in use is tiger..platform is linux. This installation might or might not have EJB 3.0 Pre 4 in there...
I've configured a datasource on the server and it seems to be installed in JNDI namespace by java: NoTransFS .I'm now figuring out a problen having a DirContext object created by using DirContextFactory.getConnection() method.
There are one set of exceptions returned by the servlet and then the Root cause set...here's how Root Cause begins...
***************************
javax.naming.NamingException: Unable to get Connection: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 90000 [ms] )
org.jboss.chap7.ex1.ra.DirContextFactoryImpl.getConnection(DirContextFactoryImpl.java:46)
serverfun.ejb.webcentric.WebContextEJBBean.theRandomizer(WebContextEJBBean.java:59)
serverfun.ejb.webcentric.WebContextEJBBean.getRandomFileInDir(WebContextEJBBean.java:107)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.jboss.invocation.Invocation.performCall(Invocation.java:345)....
***************************************
The manual is very informative about how this jca consept works. this problem however might be a small detail in a larger context...
Exceptions are informative also... What might be the part in the JCA configuration that refers to "Blocking" in the exception message ?
I would first ask what " No ManagedConnections available within configured blocking.." means?
jmx-console shows on the jca section:
name=NoTransFS,service=ConnectionFactoryBinding
name=NoTransFS,service=ManagedConnectionFactory
name=NoTransFS,service=ManagedConnectionPool
name=NoTransFS,service=NoTxCM
Should it use FSManagedConnection instead of ManagedConnection for filesystem context to be available ??
Could this be security related problem? As far as I can tell there is no security configuration related to this datasource at the moment.
And Finally...what kind of technicues are there to effectively test ejb's method by method...to pinpoint to the very method and the very exception that in effect composes the rest of the two pages of exceptions?
Here's the Oh! part of this quzzing:
the EJB is of stateles session -type with local end remote interfaces and this exception is from the remote client (JSP Servlet).
I think the dcf.getconnection fails:
InitialContext inictx = new InitialContext();
Object ref = inictx.lookup("java:NoTransFS");
DirContextFactory dcf = (DirContextFactory) ref;
webdirectory = (DirContext)dcf.getConnection();
My hunch is that there is something to be configured in the JCA for this to work. The Module is supposed to handle all sorts of tasks related to webpages and this bean is supposed to pick a random image from a directory for the web page to use...
Maybe tehere's something in the tomcat that needs to be figured out?
Kind regards...Kai