• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

Swing connection to database using EJB deployed on JBOSS

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My question though it pertains to a Swing issue is actually JBoss related and hence am posting it here

Brief Problem Statement: Web portion of an application connects to database A while Swing portion connects to database B.
How to make Swing portion connect to database A?

Technologies Used : JBoss, Eclipse, SQLServer 2000, Java Swing

I have an application that has a web component and a Swing component. To be clearer I will quickly run through a typical way to access the Swing part of the application

1. Access the web URL
2. Logon
3. Click a link called 'Business Order Application'.

That link opens up a logon dialog box (Swing based) which authenticates the user against the SAME database that step 1 above does.

Now, for testing a new enhancement to the system, I made the web part of the application point to a 'test' DB by modifying the mssql-ds.xml file in the jboss /server/default/deploy directory. Things worked fine.

But when I now access the Swing application, it is still accessing the 'prod' database. So it is obviously not taking the mssql-ds.xml change I made (although the web app does).

Question is, how to make the Swing access the 'test' DB too?

In step 3 above, a .JNLP XML file is called. That XML file points to the following JAR files

j2ee.jar
javaws.jar
jbossall-client.jar
jboss-client.jar
jboss-common-client.jar
jboss-j2ee.jar
jboss-system-client.jar
jdom.jar
jnlp-servlet.jar
log4j.jar
PathologyEjb-client.jar

The last JAR file is my creation. I have built and rebuilt that file to solve the problem but without success. I am also pasting below the entire JNLP file

-----------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application MODIFIED -->
<jnlp
spec="1.0+"
codebase="$$codebase"
href="orderApp.jnlp">
<information>
<title>Order Management Application</title>
<vendor>APA, Inc.</vendor>
<homepage href="../index.jsp"/>
<description>Order Management Application</description>
<description kind="short">A webstart application to administer business office orders.</description>
</information>

<security>
<all-permissions />
</security>

<resources>
<j2se version="1.4" />
<jar href="orderApp.jar" />
<jar href="lib/PathologyEjb-client.jar" />
<!--
<jar href="lib/jaas.jar" />
-->
<jar href="lib/jboss-client.jar" />
<jar href="lib/jboss-common-client.jar"/>
<!--
<jar href="lib/jboss-iiop-client"/>
-->
<jar href="lib/jboss-j2ee.jar"/>
<!--
<jar href="lib/jboss-net-client.jar"/>
-->
<jar href="lib/jboss-system-client.jar"/>

<jar href="lib/jbossall-client.jar"/>
<jar href="lib/log4j.jar"/>
<!--
<jar href="lib/batik.jar"/>
<jar href="lib/fop.jar"/>
<jar href="lib/avalon-framework-cvs-20020806.jar"/>
<jar href="lib/orderxslt.jar"/>
-->

<jar href="lib/jdom.jar"/>
<jar href="lib/jnlp-servlet.jar"/>
<jar href="lib/j2ee.jar"/>

<!--
<jar href="lib/jbossha-client.jar"/>
<jar href="lib/jbossmq-client.jar"/>
-->
</resources>
<application-desc main-class="edu.uc.pathology.webstart.order.OrderMain" />
</jnlp>

-----------------------------------------------------------------------------------------------------------------------

Does something need changing in the file above?. How can I make the Swing point to the 'test' DB?

If you need any further info, please let me know.

Thanks,
Sharad
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic