Leandro Dantas

Greenhorn
+ Follow
since Feb 01, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Leandro Dantas

try to change the HttpSession sess = request.getSession(true);

putit with no arguments: HttpSession sess = request.getSession();
15 years ago
You can create the timer on servlet started by the container using on your web.xml

[ January 09, 2008: Message edited by: Leandro Dantas ]
16 years ago
As said before, it's not easy at all.

What you can try to implement is a local system that sync with a remote database.

What I thought about:
Develop your local system with local database.
Keep a mirror schema with one more field on each table: dml. This field is created to keep the operation done with that row on database ( insert, delete or update ). This mirror schema will store any operation done on your local database.
The same must be done on your remote server. any remote operation must be stored to YOUR local system be able to reproduce it.

Create a background service that redo all commands done on your mirror tables on the remote database and redo on your local db all remote queries.

You must beware of inconsistent operations:
- what you will do if you try to insert an already inserted registry? Update? Leave it alone?
- And what about an update on a row that was deleted? should re-insert it?

DO you REALLY need this feature? hehehe.

Good Luck. You will need.
I may be lost on something, but why not change the point of view?

Instead of creating a thread to process a request, you could create a group of consumers for a queue of requests.
Each consumer will check the queue, get a request, process it and check the queue again.

You can specify the number of consumers based on your needs.
Hi.

The best approach is use the PreparedStatment as George Stoianov pointed out.

using the setString method will let the driver use the correct method to escape the symbol.

Regards.
It avoids to someone accidentally change the object linked to this variable.

That must be used to let an anonymous class to access the object and it is a good practice.

For example:
16 years ago
A Type 2 driver calls the native drivers for the platform that you are running.

They use jni to make calls to the vendor code/lib/api.
[ November 28, 2007: Message edited by: Leandro Dantas ]
I know it is a old post, but I had this need on my current project.

I could solve this downloading crimson.jar from apache ( http://xml.apache.org/crimson/ ) and added it to JDK Runtime Classpath configuration.

It worked so far, but we need to do more tests.

Regards
16 years ago
It is a bad design and should never be used. Period.

But if for any reason (compatibility with 3rd party code, for example) you need to do, it can be done.

public SingletonClass implements Cloneable
{
//...SingletonStuff...

public Object clone()
{
return this;
}
}

this will ensure that you will be working with just one instance.
16 years ago
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.java/tjvjdmlt.htm

CallableStatement cstmt;
ResultSet rs;
int i;
String s;
...
cstmt.execute(); // Call the stored procedure 1
rs = cstmt.getResultSet(); // Get the first result set 2
while (rs.next()) { // Position the cursor 3
i = rs.getInt(1); // Retrieve current result set value
System.out.println("Value from first result set = " + i);
// Print the value
}
cstmt.getMoreResults(); // Point to the second result set 4a
// and close the first result set
rs = cstmt.getResultSet(); // Get the second result set 4b
while (rs.next()) { // Position the cursor 4c
s = rs.getString(1); // Retrieve current result set value
System.out.println("Value from second result set = " + s);
// Print the value
}
rs.close(); // Close the result set
cstmt.close(); // Close the statement

Best regards.
It will probably work fine since WSAD is based on Eclipse engine.
[ March 08, 2007: Message edited by: Leandro Dantas ]
17 years ago
I am not sure but It seems to be related to your jdk path.
It is probably in C:\Program Files\.

Try to reinstall to a path with no blank spaces in the name.

And remember, to run this version smoothly, you need jdk 1.3
When you need to change from, for example, weblogic.xml to jboss.xml you are not rewriting/recompiling your bean/ejb-jar.xml. You are adjusting the settings of the bean to match your specific platform.
I think this link can be helpful.

http://www.osx86project.org/
17 years ago