DataSource and JNDI
Hi all!
I searched but did not find a solution for my problem. I have JSC installed and everything is working. I need a database connection, creating one from Creator works also with bundled AS.
But how can I use JNDI names as source for my RowSets? I read that I could use the data source from deployment servers view, but I have an AS 9 to depoly to and adding this one simply doesn't work.
So how can I manage this the right way? I have setup two working JDBC ressouces on both the bundled and the standalone AS - but what now?
Thanks for any input,
Jan
[596 byte] By [
JanKesten] at [2007-11-26 8:48:00]

# 2
Hi Roman!
Thanks for your reply. I've read this before - and I have something like
<ressource-ref>
<res-ref-name>jdbc/TechData</res-ref-name>
<jndi-name>jdbc/TechData</jndi-name>
</ressource-ref>
This seems to work on both systems, as I fetch a database connection from InitialContext from my application and use this to make inserts to my database tables. These work fine.
I added a Data Source first in Creator (for PostgreSQL) with TechData as name. I can see any tables, issue queries and so on. After deploying to the bundled AppServer there is a ressource jdbc/TechData created.
Now I use some table components to display some data - dropped one on my page. Dropped a table on my page, creating a DataProvider. Used this DataProvider for the tableRowGroup.
Deploying this to the bundled AppServer results in the page displayed correct with a filled table. Deploying to an stand-alone AppServer (version 9) results in my inserts working like before but the table is empty ("No items found.").
What could be the reason for this behaviour?
Thanks,
Jan
# 4
Hi!
Indeed there are - and only in the standalone AS9. Just noticed that I was always looking at the wrong one and was wondering that no new entries arrive (obviously not enough coffee today). Here is the exeception:
Log Entry Detail
Details
Timestamp: 19.07.2006 14:42:08.392
Log Level: SEVERE
Logger: javax.enterprise.system.container.web
Name-Value Pairs: _ThreadID=12;_ThreadName=httpWorkerThread-4848-0;_RequestID=07ca16f3-10d1-4deb-8f31-2055b64cae1c;
Record Number: 444
Message ID: StandardWrapperValve[RemoteJmxConnectorServlet]
Complete Message
Servlet.service() for servlet RemoteJmxConnectorServlet threw exception
java.lang.ClassCastException: javax.management.remote.message.MBeanServerRequestMessage
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.readRequestMessage(RemoteJmxConnectorServlet.java:195)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:108)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
This message shows up every 10 seconds in the log and only on AS9 but not at the bundled one.
Is this a problem with my application or is there anything wrong with the AppServer?
Thanks,
Jan