| connection pooling to oracle in sun server |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- [Switch()...case]From String to enumDaniel Moyne wrote:
> To extend this topic a little bit : in Java is there any simple built-in
> method to get the whole collection of instances already created of a
> class ; here the whole collection of instances can easily be accessed with
> values() ; then iteration is made possible to search for a particular
> instance fulfilling some conditions (here the unique member = a particular
> value) ?
Only for enums.
You can, of course, create your own Collection (Set, List, Map) of instances
of any non-enum class. There is a more-or-less standard idiom for that,
called a "registry".
public class RegisteredInstance
{
private static final Map <String, RegisteredInstance> registry =
new ConcurrentHashMap <String, RegisteredInstance> ();
private final String name;
public RegisteredInstance( String n )
{
if ( n == null )
{
throw new IllegalArgumentException( new NullPointerException(
"name is null" ));
}
name = n;
registry.put( name, this );
}
// add @Overrides for equals(), hashCode()
// add other logic, including registry access
}
If you don't need associative lookup of the instances, you could use a Set or
a List for the registry instead, and iterate at need.
--
Lew
That is not the right way to use a semicolon in English.
- 1
- Message Board ApplicationAnyone know a decent WWW message board application that runs on JSP? A
critical feature is the ability to edit posts.
GP
- 1
- Calendar get methodHello,
I know there are a lot of issues with the Calendar class in Java (from
my searches anyway), but I can't seem to find one for my simple
question. When using the get methods of the calendar class, which
timezone is it using? I've changed the default time zone using
TimeZone.setDefault and have set the timezone of the Calendar object
itself, but it seems to keep returning values for a GMT timezone. Where
can I set it so the get methods of the Calendar class return the
correct values for a timezone I specify?
T.Ramos
- 1
- tomcat - web service in a warHello I have the following problem. Normally when creating a JSP
application I put all files in a web archive (.war file) which makes it
possible to transfer the app to the webapps dir of another server and
the app is deployed directly by the application manager.
Also in the folder /axis/WEB-INF/classes I already have some
precompiled web services, which are running perfectly.
My question is, is there also a default way for creating .war file of a
web service (and related files) in such a way that I can put the .war
file in the axis dir on another server, and everything is going to work
directly (auto-deployment in axis dir?)
- 1
- Applet Security (File Transfer) QuestionsI've looked through a few books and various web sites. I'm still not clear
on this and would like to make sure I have this right.
I would like to use an applet in a web page. When the user presses an
"UPLOAD" button, a file chooser would appear, the user could select a file,
then the applet would read the file in and (instead of a regular upload),
e-mail it to a specific address (a program will be reading the emailed
files and processing them).
I think I read that as long as the user specified a specific filename (like
with a file chooser) and I converted the filename to a URL, I could read
that file without having a signed applet. Is this true? Can I read in a
specific file from an applet and e-mail it somewhere?
And, if I can't, it looks like it is really easy to sign an applet. Is it
as easy to create a signed class as it looks? If I upgrade the applet, do
I have to have it re-signed or done over so the new version is recognized
too?
Thanks!
Hal
- 1
- In Search Of: Abstract Algebra system.I'd like to use an abstract algebra engine of some sort to define 3d
shapes and their intersections.
For example, I would like to create a structure for a Sphere that is
represented by (P - P0) dot (P - P0) <= R0*R0
where R0 and P0 are constants.
And the intersections of two Spheres, is represented by a system of
inequalities:
[(P - P0) dot (P - P0) <= R0*R0,
(P - P1) dot (P - P1) <= R1*R1]
I'd also like to be able to determine the intersection points of the
surface of this system with a Ray.
The actual goal is to create a Beam Casting project in Java. Beam
Casting is like Ray Casting, but you start with a pyramid instead of a ray.
I've found a library called Java Algebra System 2.0, but I'm confused on
how to apply it toward my goal. If there is anything more specifically
tailored to my problem, or someone can help me understand JAS, I'd
greatly appreciate the info.
Thanks,
Daniel.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
- 1
- How to deprecated a method in a class?I would like to deprecated some methods in my
class. So next time when people use those methods,
they will get the warning messages during compiling.
If you know how, please let me know.
Thank Q very much in advance!
- 1
- ATI or NVidia - best for Java3d?I'm contemplating purchasing a new graphics
card, and would like to purchase one that
performs well with Java3D.
Which begs two questions:
1. Which moderately high end card is
better: ATI, or Nvidia? Given the current
controversy relating to Half Life 2 and these two
cards, I'm frankly a tad unsure!
2. Is there a well-known benchmark written in Java3d
to make the card choice a little easier?
Many thanks in advance!
David
- 1
- Printing JFrame including JTable and JLabelHi All
I have The JFrame with JTable, JLabels and JButtons .I want to
print only the JLabel and JTable (Leaving buttons) with prefered
size.so help me to solve my printing problem.
- 6
- Maven: Parse error reading POM. Reason: parser must be on START_TAG or TEXTIt appears mavens site builder doesnt read my pom.xml - though all the
other utilities (compiles, package, filter etc.) are fine. It *is*
valid XML (pom.xml follows stacktrace)
C:\myproject\build\registration>mvn site
[INFO] Scanning for projects...
[INFO]
-------------------------------------------------------------------------
---
[ERROR] FATAL ERROR
[INFO]
-------------------------------------------------------------------------
---
[INFO] Error building POM (may not be this project's POM).
Project ID: unknown
POM Location: C:\myproject\build\registration\pom.xml
Reason: Parse error reading POM. Reason: parser must be on START_TAG or
TEXT to
read text (position: START_TAG seen ...<resources>\r\n
<filters><filter>... @
31:22)
[INFO]
-------------------------------------------------------------------------
---
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading
POM. Reaso
n: parser must be on START_TAG or TEXT to read text (position:
START_TAG seen ..
.<resources>\r\n <filters><filter>... @31:22)
at
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Parse
error re
ading POM. Reason: parser must be on START_TAG or TEXT to read text
(position: S
TART_TAG seen ...<resources>\r\n <filters><filter>... @31:22)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1134)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1094)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
le(DefaultMavenProjectBuilder.java:289)
at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
nProjectBuilder.java:274)
at
org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:447)
at
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351)
... 11 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
parser must
be on START_TAG or TEXT to read text (position: START_TAG seen
...<resources>\r
\n <filters><filter>... @31:22)
at
org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:106
8)
at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(MavenXpp3Re
ader.java:682)
at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Re
ader.java:2284)
at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.j
ava:4548)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1130)
... 17 more
[INFO]
-------------------------------------------------------------------------
---
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Jul 08 14:15:44 EDT 2006
[INFO] Final Memory: 1M/2M
[INFO]
-------------------------------------------------------------------------
---
C:\myproject\build\registration>mvn -version
Maven version: 2.0.2
C:\myproject\build\registration>mvn -e site
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
-------------------------------------------------------------------------
---
[ERROR] FATAL ERROR
[INFO]
-------------------------------------------------------------------------
---
[INFO] Error building POM (may not be this project's POM).
Project ID: unknown
POM Location: C:\myproject\build\registration\pom.xml
Reason: Parse error reading POM. Reason: parser must be on START_TAG or
TEXT to
read text (position: START_TAG seen ...<resources>\r\n
<filters><filter>... @
31:22)
[INFO]
-------------------------------------------------------------------------
---
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading
POM. Reaso
n: parser must be on START_TAG or TEXT to read text (position:
START_TAG seen ..
.<resources>\r\n <filters><filter>... @31:22)
at
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Parse
error re
ading POM. Reason: parser must be on START_TAG or TEXT to read text
(position: S
TART_TAG seen ...<resources>\r\n <filters><filter>... @31:22)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1134)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1094)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
le(DefaultMavenProjectBuilder.java:289)
at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
nProjectBuilder.java:274)
at
org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:447)
at
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351)
... 11 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
parser must
be on START_TAG or TEXT to read text (position: START_TAG seen
...<resources>\r
\n <filters><filter>... @31:22)
at
org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:106
8)
at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(MavenXpp3Re
ader.java:682)
at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Re
ader.java:2284)
at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.j
ava:4548)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1130)
... 17 more
[INFO]
-------------------------------------------------------------------------
---
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Jul 08 14:22:03 EDT 2006
[INFO] Final Memory: 1M/2M
[INFO]
-------------------------------------------------------------------------
---
C:\myproject\build\registration>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myproject.registration</groupId>
<artifactId>myproject-registration-1.0.jar</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Patient Information System</name>
<url>http://www.myproject.com</url>
<description>Patient Information System</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
<resources>
<filters><filter>filter.properties</filter></filters>
<resource><directory>src/main/resources</directory>
<filtering>true</filtering></resource>
</resources>
</build>
</project>
- 6
- boolean questionpcourterelle wrote:
> <email***@***.com> wrote in message
> news:email***@***.com...
>
>>A boolean variable can hold one of two values over it's lifetime (three
>>really).
>>
>>1. Uninitialized
>> boolean var;
>>
>
>
> Hmmm. I've tried this and it will not compile. The boolean variable 'var'
> has to be initialized to either true of false to be compilable. In a sense
> the declaration
>
> boolean var
>
> sets the variable to null but since it doesn't compile what good is it?
>
> pc
>
>
well duh, null is for objects! Not primitives...
- 6
- log4j as a static class ?Hello all,
every example I found for log4j tells you to declare a final static
variable to hold the reference to log4j Logger for each of your classes
-by means of Logger.getLogger(Myclass.class)
What about my approach?
package mypackage;
import org.apache.log4j.Logger;
public final class Log {
public static org.apache.log4j.Logger log =
Logger.getLogger(Log.class);
private Log(){
}
}
Then, from within any class I need to log something, I simply call
Log.log.myloglevel("something");
Is this wrong?
Thanks,
regards
Matteo
- 9
- DefaultTreeCellRendererhi,
I want remove the icon, that stays by a TreeNode lefts, that has got
any TreeNodes. The icon presents, the TreeNode is either expanded or
collapsed.
(I am meaning not the icon, that can you remove with:
defaultTreeCellRenderer.setLeafIcon(null);
defaultTreeCellRenderer.setClosedIcon(null);
defaultTreeCellRenderer.setOpenIcon(null);
)
thank You a lot for any help!!!
Joana
- 10
- Clarification of OS "advancement"In comp.os.linux.advocacy, I heard Tim Tyler say:
>In comp.lang.java.advocacy T. Max Devlin <email***@***.com> wrote or quoted:
>> In comp.os.linux.advocacy, I heard Tim Tyler say:
>>>In comp.lang.java.advocacy T. Max Devlin <email***@***.com> wrote or quoted:
>>>> In comp.os.linux.advocacy, I heard Tim Tyler say:
>>>>>> In comp.os.linux.advocacy, I heard Tim Tyler say:
>>>>>>>In comp.lang.java.advocacy T. Max Devlin <email***@***.com> wrote or quoted:
>>>>>>>> In comp.os.linux.advocacy, I heard Jorn W Janneck say:
>>>>>>>>>In comp.lang.java.advocacy T. Max Devlin <email***@***.com> wrote:
>
>>>>>>>>>> It is, on the face of it, impossible, what he says. Businesses do
>>>>>>>>>> not and should not spend money on things without expecting to own
>>>>>>>>>> them once they do.
>>>>>>>>>
>>>>>>>>>eclipse-ibm?
>>>>>>>>
>>>>>>>> What about it? [...]
>>>>>>>
>>>>>>>I think he means Eclipse refutes the idea you expressed above - that
>>>>>>>businesses do not and should not spend money on things without expecting
>>>>>>>to own them.
>>>>>>>
>>>>>>>IBM has invested a lot of money in Eclipse - but it doesn't own it.
>
>[...]
>
>>>>>That wasn't the thesis you presented above. What you wrote was:
>>>>>
>>>>>``Businesses do not and should not spend money on things without
>>>>> expecting to own them once they do.''
>>>>>
>>>>>A simple counter-example neatly dispenses with that thesis.
>>>>
>>>> I'm afraid not. It would be nice if an /apparent/ counter-example, however
>>>> simple, could refute economic truth. Or maybe it wouldn't be.
>>>>
>>>> Either way, your counter-thesis would have to be "businesses should spend
>>>> money on things without expecting to own them once they do", which is
>>>> clearly preposterous.
>>>
>>>You seem to be experiencing some difficulty with inverting a thesis.
>>>
>>>The opposite of "do not and should not" is not "should" - it is:
>>>"do or are not morally prohibited from".
>>
>> Yea, sure.
>
>Try it on for size.
>
>Your own argument leads to a conclusion which is anything but preposterous
>if you use valid forms of reasoning.
My statement was true. That you can extend it to absurd lengths by pretending
it is a mathematical claim and then find it lacking because it is not is a
problem for you, not for me.
--
T. Max Devlin
*** It's 2003! Why can't I teleport?!? ***
-- Louis Black
- 16
- GridBagLayout confusionGreetings,
Resizing components added in a GridBagLayout doesn't seem to affect
the actual size of the component. Where am I lost?
Snippet below;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Demo
{
public static void main(String[] args)
{
Window win = new Window();
}
}
class Window extends JFrame implements ActionListener
{
JButton bt1 = new JButton("Start Test 1");
JButton bt2 = new JButton("Start Test 2");
public Window()
{
super("Window Title");
setSize(400,100);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
Container ca = getContentPane();
ca.setBackground(Color.white);
GridBagLayout gbl = new GridBagLayout();
GridBagConstraints gbc = new GridBagConstraints();
ca.setLayout(gbl);
bt1.addActionListener(this);
bt2.addActionListener(this);
gbc.gridx = 1;
gbc.gridy = 1;
ca.add(bt1,gbc);
gbc.gridx = 2;
gbc.gridy = 1;
gbc.gridheight = 400;
gbc.gridwidth = 400;
bt2.setSize(400,400);
ca.add(bt2,gbc);
setContentPane(ca);
}
public void actionPerformed(ActionEvent e)
{
if (e.getSource()==bt1)
System.out.println("You Pressed button 1");
else
System.out.println("You Pressed button 2");
}
}
|
| Author |
Message |
Gowri

|
Posted: 2006-7-11 22:44:00 |
Top |
java-programmer, connection pooling to oracle in sun server
plz help me how connection pooling to oracle is done on a sun server
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-7-12 2:11:00 |
Top |
java-programmer >> connection pooling to oracle in sun server
"Gowri" <email***@***.com> wrote in message
news:email***@***.com...
> plz help me how connection pooling to oracle is done on a sun server
>
When I google for "how connection pooling to oracle is done on a sun
server", I get
http://www.justwerks.com/oracle-connection-pooling-under-sun-one-web-6-1
- Oliver
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- [signed applet] certification authorityHi,
I have a signed applet (signed myself with jarsigner.exe).
It works fine but the users get a warning message before accepting the
applet to execute.
Next step, is to have my certificate trusted by Verisign or other
third party.
Do you know any link to a site that would explain the procedure to
follow in details ?
Which certification authority would you recommend ? the cheapest ?
thanks
- 2
- Client Code for Axis - Newbie QuestionHi,
I'm a first time Axis 1.1 user and trying to figure out how to write
web services client code. I used WSDL2JAVA to create java source from
the wsdl. I ended up with the following files...
xxxx_Port.java
xxxx_Service.java
xxxx_ServiceLocator.java
xxxxBindingStub.java
xxxxRequest.java
xxxxResponse.java
Does anyone have some sample code they can share with me that shows
the basics of how to set up the request and response parameters and
then actually make the call to the web service. Not sure which
classes or methods to use.
Thanks
- 3
- Add a computer language to NetbeansHello
This may be a simple question. I searched in Google but I think I am
using inapropiate words for the query and I don't get what I want.
How can I add a syntax highlight for a new language, in my case X3D,
to Netbeans?
Any general tutorial?
Thanks
Jordi
Note: Does someone already have done this with VRML or X3D?
- 4
- Tools To Tackle New Code Base?Hi,
I'm looking for advice on how to quickly come to grips with
a large ( ~5000 files), undocumented codebase that's mostly Java
( compiles with Sun's command line compiler under Windows XP ).
Here are some considerations.
1) I'm new to Java, coming from a C++ background
2) I need to get a handle on this quickly but also cheaply.
3) I have no access to the original programmer.
What tools are availble that might help me analyze and
visualize the relationship between various modules and classes
in this project? In the past, with large C++ codebases I've
looked at Doxygen but the learning curve seemed very steep
and I never did figure out the graphical tools.
Appreciate any advice, the more concrete the better.
If there's a different forum I should be posting this in please let
me know.
TIA,
Gerry Murphy
- 5
- Java Everywhere videoCool cool video, matrix-like, about Java Everywhere.
http://www.youtube.com/watch?v=NW2WKCai2Kg
The REALLY funny thing is it's in Flash version 8, which just goes to
show Java may be everywhere, but there are degrees of everywhere even
in this.
- 6
- Transparency in Java ImagingHi all!
When I have multiple images in Java (I'm using JAI, but I thing this has
to do with ColorModel, which is present in AWT) which I want to stack
above each other, is there any possibility to define white as
"transparent", i.e. whenever an image contains white pixels they should
not be drawn... any ideas?
If this is impossible, how else do I use transparency when drawing
images? (i.e. how can I stack them, without each overwriting the image
below it)?
thanks in advance and kind regards,
Messi
- 7
- considering a job as an ATG dynamo server adapter to j2ee enviormenthi...
i've been offered a job which involves getting a large content based
java application based on ATG dynamo server version 4.5.0, they
considering a move to a j2ee enviorment system (a rewrite of the
entire application is in order) and need a person who will study the
current application and who willl provide insight for writing the
existing one.
i have no actuall expirience in j2ee ejb etc.. and as such, would
like what is the learning curve for this server
- 8
- Networked version of Swing (X windows style)?Hello,
I was wondering if something like that exists or if someone has ever
thought about it:
Instead of Swing updating the local screen and obtaining events from
the local mouse & keyboard, it may be useful in some cases to have a
networked version of Swing, just like XWindows.
Imagine a workstation connecting to a remote JVM that starts a typical
swing application. But this JVM/Classpath/etc is configured so that all
Swing calls are serialized to the remote workstation, where all the
screen updates are made. And viceversa for the mouse and keyboard.
Probably Swing is not well designed for this kind of "pluggability"...
in any case it would be an interesting thing to have.
The key requirement here is that preexisting AWT/Swing applications can
be remotely executed without modification.
Is there any project or product that does this?
If not, any ideas on how to implement it?
Thanks,
Luis.
- 9
- CLOB problem in JAVAHi :
I am getting a casting exception (java.lang.ClassCastException:
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection) when invoking the
CLOB.createTemporary metehod. Extract of relevant lines shown below:
Any
ideas how I can resolve this?
Versions:
Oracle 9i
WebSphere Ver 5.1
Cheers
Lig
import java.io.Writer;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Blob;
import javax.sql.DataSource;
import javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NamingException;
import java.util.List;
import java.util.ArrayList;
import java.sql.Types;
import oracle.jdbc.OracleConnection;
import oracle.jdbc.driver.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import oracle.sql.CLOB;
.
.
.
Context jndiContext = new InitialContext();
DataSource ds = (DataSource)jndiContext.lookup("java:comp/env/"
+s_dataSource);
Connection conn = ds.getConnection();
tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION );
Error Encountered: -
java.lang.ClassCastException:
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection
- 10
- Bypassing Struts validator - why doesn't bCancel=true work?Hi there,
I'm trying to bypass the Struts validator sometimes on my page. I'm
using JSP and Struts 1.1.
Basically I have a submit button that submits a form. The Struts
validator component is working great for client-side validation of the
contents of this form.
However, now I've been asked to implement a drop down on the page that
repopulates another drop down box when it is changed. Because of the
size of the data, I'm doing this server side, not client side. That
is, I want the page to refresh and then repopulate these fields.
This means I have to bypass the validator to ignore anything the user
might have already entered in the fields. I've read all over the
newsgroups how putting "bCancel=true" in your onclick or onchange
method should do the trick, but it doesn't work for me. When I create
my select box like this
<html:select property="countyId" tabindex="1"
onchange="bCancel=true;document.forms[0].method.value='changeCounty';document.forms[0].target
= '_self';document.forms[0].onsubmit();document.forms[0].submit();">
and then change the drop down box, nothing happens. Control never
gets to my changeCounty action. I've checked that. But I also don't
get any validation messages from the validator, despite there being
validation errors on the page when I change the drop down box. So
it's like the validator function doesn't execute either. (The method
value is there because I'm using a DispatchAction class.)
Is the validation function running or not? How can I bypass the
validation and still submit the form?
Thanks for the help!
Marnie
- 11
- Log4j - dealing with multithreaded invocations?Hi,
I have a class with 4 methods. I want to use Log4j to log messages for
each of these methods to a common log file.
Ideally I would like the log messages for each method to be seperated
from the others. But if multiple users were to invoke the methods at
the same time, then the messages in my log file would be jumbled up
with the others.
I can probably try making the methods synchronized so i dont get into
this sort of trouble, but logging by itself doesn't seem to be a good
enough reason to be making methods synchronized.
What approach can I use to deal with this?
Thank you,
Rohit.
- 12
- -Xms setting makes IE exitFolks,
My company uses a Java based server application, and Internet Explorer
on our client machines. Recently our server application was upgraded,
and instead of needing Microsoft's JVM on the client machines we are
now using Sun Java version 1.4.2_08.
Performance around applet caching was poor, and the recommended cure
for that was to set "-Xms128m -Xmx256m" in the Java Runtime
Parameters from the Java control panel. On machines that have never had
the Microsoft JVM installed this fixed the problem.
However, on machines that have had the JVM installed, this causes the
browser to exit whenever an applet is started. From doing some research
it seems this problem is usually caused by a conflict between the Sun
and Microsoft Java components. So the JVM was uninstalled using the
process detailed here: -
http://www.java.com/en/download/help/uninstall_msvm.xml#cli
(That is identical to the steps found on Microsoft's knowledgebase)
After a lot of experimentation I have found that setting only the
starting memory setting "-Xms64m" does not cause any problems.
However this is clearly far from ideal and I am looking for a better
solution. Does anybody have any suggestions?
-----
Lewis
- 13
- Switching GTK theme on Java 1.6 (i.e., mustang)I'm at a loss on how to change on-the-fly the theme (i.e., resource) for the
GTK look and feel on Java 1.6 (Mustang). On 1.5 it was a simple matter of
setting a system property (i.e., "swing.gtkthemefile") like this:
System.setProperty ("swing.gtkthemefile", fGTKThemeFile);
But on Mustang it has been completely changed.
It is probably just as easy but I'm missing something?
Thanks.
Karl
email***@***.com
- 14
- [ADV] Java GUI test tool qftestJUI version 1.4 released
Quality First Software (QFS) is pleased to announce the release of
version 1.4 of qftestJUI - The test tool for Java User Interfaces.
The is the second medium upgrade for qftestJUI since the release of
version 1.0 in October 2002. Along with a greatly improved and
extended tutorial, the highlights of this upgrade are support for Java
WebStart, extended support for distributed development through an
include mechanism and dependency tracking across multiple test-suites.
An evaluation version is freely available for download at
http://www.qfs.de/en/qftestJUI/download.html
where you'll also find a link to the latest release notes.
What is it?
===========
Based on capture/replay, but extending far beyond, qftestJUI manages
the creation and execution of automated tests for Java/Swing
applications with a graphical user interface. It runs on Windows and
all major Unix systems with JDKs from 1.1.8 to 1.4.2.
The key feature of qftestJUI is an exceptionally high test
reusability, minimizing the effort necessary for regression testing.
Intuitive graphical design of tests reduces the cost of introducing
qftestJUI into the QA process. Additionally, qftestJUI sports a set of
features for the advanced user such as variables, procedures and
scripting. Extensive documentation, including a tutorial, is available
for users approaching the product with different background and skill
levels.
For detailed product description and free evaluation please visit
http://www.qfs.de/en/qftestJUI/index.html
--
Gregor Schmid email***@***.com
Quality First Software GmbH http://www.qfs.de
- 15
- XApool +multiple replicated nodesHi All,
I am creating a small research system for testing various fall over
algorithms in a distributed database situation and and have been looking at
using XApool as a possible JDBC XA proxying and load balancing solution. I
am just wondering if anyone else has had any luck getting the XApool system
to talk to different oracle hosts ? I plan to use the development/personal
edition of oracle and their thin jdbc driver, which is also XA compatible.
Anyway, if someone could point me in the right direction I would be much
appreciated :) I've had a look at the docs but cannot see where I add the
different nodes into the pool ???
|
|
|