Thanks for your further explanation which is very helpful. After doing a few experiments,
I have a follow-up question below hoping it is easy to answer from an expert like you:
You confirmed earlier that to have an Applet to query a teiid vdb via JDBC, JBoss
Application Server is a must-to-have. I am not clear on the relationship between teiid
server and JBoss AS. Do I need to start both servers to make an Applet query a teiid vdb
deployed in teiid server which is also embedded in JBoss AS? From the instruction link you
sent earlier, it seems server name and port parameters for JDBC connection point to the
teiid server (i.e., host name or localhost and port 31000). Although JSP works without
starting teiid server (i.e., only JBoss AS is started), it seems I always have to start
teiid server on port 31000 to make Java Applet JDBC code "work". By
"work" here, I don't mean it really works since it only works through
AppletViewer. When I deploy the signed Applet to JBoss AS and run it through browser, I
got exception from com.metamatrix.jdbc.MMSQLException complaining DH KeyPairGenerator not
available. It could be Applet sandbox/security problem, but it could also be a problem
with JDBC connection to teiid server port. Could you clarify a bit on what role does JBoss
AS play in terms of having Applet connect via JDBC to teiid vdb deployed in teiid server
which is embedded in JBoss AS? Also, I have to use teiid server hostname and port to make
JDBC connections (rather than JBoss AS hostname and port), right? Also let me know any
suggestions/insight on Java Applet exception on DH KeyPairGenerator not available. I am
currently searching on the internet hoping for some quick fix, but no luck yet.
Thanks again for all your quick responses which have been so helpful in getting me thus
far on investigating teiid/JBoss AS in our project use.
From: Ramesh Reddy [mailto:firstname.lastname@example.org]
Sent: Tuesday, June 08, 2010 5:04 PM
To: Hong Yi
Subject: RE: [teiid-users] Question on Applet accessing vdb deployed in JBoss AS
On Tue, 2010-06-08 at 21:08 +0000, Hong Yi wrote:
I defined the "Teiid embedded" vdb as a data source in
JBoss AS, but
the Applet has to communicate with this teiid data source via the
defined JNDI name, right?
I completely understand what you are asking. Read my earlier reply
again, you will find your answer.
applet != JSP
applet --> lives in user's browser VM
JSP --> gets converted to java code in on your server, only "html"
content is sent to the browser
so, this difference is single VM in the JSP case vs two separate VM's in
the applet case, thus JNDI context is not available in the applet's
Even though Teiid is deployed inside JBoss AS, you can reach it two
1) Creating "-ds.xml" (creating a data source) and using the JNDI name
in your servlets/JSP pages. Here "embedded" means not going over the
socket, as Teiid runtime is available locally to the VM.
2) Making a direct JDBC connection. This uses a socket connection from
your application to the Teiid runtime. Just like if you have made
connection to Oracle.
I am suggesting to use #2, in your applet.
Hope this helps.