NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
SreeAurovindh
Joined: 25 Jan 2009 Posts: 9
|
Posted: Sun Jan 25, 2009 7:29 pm Post subject: Configuring Mysql with Application server(Glass fish) |
|
|
I am quite a newbie to configure MySQL with application server.I have created a datasource pool but i am not aware of what to code in these tags.
In GUI of Netbeans under Services tab
I could see MySQL server at localhost:3306[root]
if i right click i could create a database.Suppose if i create a database named "gadgets" then what are the changes that i have to make in the above configuration in order to combine with my application server.
In this case what should be my JNDI lookup after creating a Context object
ds=(DataSource)ctx.lookup("A");
where ctx is Context object
and ds is DataSource object
what should be A in order to integrate with gadgets database.
From the tutorials i have copied some of the configuration contents.What are the contents that i have to change below?
------------------In deployment descriptor---------------------------
<resource-ref>
<res-ref-name>jdbc/leagueDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
----------------------in sun-web-app.xml---------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD
Application Server 8.1 Servlet 2.4//EN"
"http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
<sun-web-app error-url="">
<context-root>/DVDLibraryLocalization</context-root>
<resource-ref>
<res-ref-name>jdbc/dvdLibraryDB</res-ref-name>
<jndi-name>jdbc/dvdLibraryDB</jndi-name>
</resource-ref>
<class-loader delegate="true"/>
<jsp-config>
<property name="classdebuginfo" value="true">
<description>Enable debug info compilation in the generated
servlet class</description>
</property>
<property name="mappedfile" value="true">
<description>Maintain a one-to-one correspondence between
static content and the generated servlet class' java
code</description>
</property>
</jsp-config>
</sun-web-app>
-------------------------------------------------------------------------------------
Thanks for your reply |
|
| Back to top |
|
 |
Victor M. Ramirez Posted via mailing list.
|
Posted: Mon Jan 26, 2009 12:40 am Post subject: Configuring Mysql with Application server(Glass fish) |
|
|
try "jdbc/leagueDB" or "jdbc/dvdLibraryDB"
2009/1/25 SreeAurovindh <address-removed ([email]address-removed[/email])>
| Quote: | I am quite a newbie to configure MySQL with application server.I have created a datasource pool but i am not aware of what to code in these tags.
In GUI of Netbeans under Services tab
I could see MySQL server at localhost:3306[root]
if i right click i could create a database.Suppose if i create a database named "gadgets" then what are the changes that i have to make in the above configuration in order to combine with my application server.
In this case what should be my JNDI lookup after creating a Context object
ds=(DataSource)ctx.lookup("A");
where ctx is Context object
and ds is DataSource object
what should be A in order to integrate with gadgets database.
From the tutorials i have copied some of the configuration contents.What are the contents that i have to change below?
------------------In deployment descriptor---------------------------
<resource-ref>
<res-ref-name>jdbc/leagueDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
----------------------in sun-web-app.xml---------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD
Application Server 8.1 Servlet 2.4//EN"
"http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
<sun-web-app error-url="">
<context-root>/DVDLibraryLocalization</context-root>
<resource-ref>
<res-ref-name>jdbc/dvdLibraryDB</res-ref-name>
<jndi-name>jdbc/dvdLibraryDB</jndi-name>
</resource-ref>
<class-loader delegate="true"/>
<jsp-config>
<property name="classdebuginfo" value="true">
<description>Enable debug info compilation in the generated
servlet class</description>
</property>
<property name="mappedfile" value="true">
<description>Maintain a one-to-one correspondence between
static content and the generated servlet class' java
code</description>
</property>
</jsp-config>
</sun-web-app>
-------------------------------------------------------------------------------------
Thanks for your reply
------------------------
Sree Aurovindh
Sun Certified Java Programmer
|
--
Victor M. Ramirez A.
Ingeniero de Desarrollo
Alemsys S.A.
NOTA CONFIDENCIAL:
La información contenida en este e-mail es confidencial y sólo puede ser utilizada por la persona o la compañia a la cual está dirigido. Si usted no es el receptor autorizado, cualquier retención, difusión, distribución o copia de este mensaje es prohibida y sancionada por la ley. Si por error recibe este mensaje, favor devolver y borrar el mensaje recibido inmediatamente.
CONFIDENCIAL NOTE:
The information in this e-mail is intended to be confidential and only for the use of the person or entity to whom it is addressed. If you are not the intended recipient, any retention, dissemination, distribution or copying of this message is strictly prohibited and sanctioned by law. If you receive this e-mail by mistake, please immediately send back and delete the received message. |
|
| Back to top |
|
 |
SreeAurovindh
Joined: 25 Jan 2009 Posts: 9
|
Posted: Mon Jan 26, 2009 3:25 am Post subject: |
|
|
| Thanks Victor M. Ramirez for your reply |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|