Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Starting a DataStore Server within a webapp

1 view
Skip to first unread message

Brenton Camac

unread,
Apr 18, 2006, 7:57:46 PM4/18/06
to
I have a web application deployed on Tomcat that accesses a JDataStore
database locally via a JDBC connection obtained from the webserver's
JNDI tree, thus using JDBC connection pooling. This combination
(together with store procedures) produces incredible performance.

However, I would like to be able to connect to this database on occasion
from a remote process (e.g. Database Pilot) to view real-time data in
the database. As I understand it, this requires that the webapp also
run a DataStore server.

My questions:

1. if remote access is enabled via running an in-process DataStore
server, will the webapp still get local access via JDBC or will all
access now go through the server thus degrade performance?

2. how is the DataStore server configured to co-exist with local access?
Can I initialize the DataStore server somehow with an existing
DataStoreDriver instance or DataStoreConnection?


FYI. Local access is currently configured by registering the
DataStoreDriver class in Tomcat's JNDI tree (done automatically when the
WAR file is deployed).

Any help or insight would be much appreciated.

thx
- Brenton

Mehmet F. Erten

unread,
Apr 19, 2006, 10:04:26 AM4/19/06
to
Hi,
Soon I will try to do same combination.
The local connection does not allow multiple (remote type) connection in
regular practice.
But on the same PC/Server remote/local you should not have any difference in
performance as much as I saw through my application.
It will be helpful if you give your "setConnection(new
com.borland.dx.sql.dataset.ConnectionDescriptor" statement in web to
JDataStore connection code.


Steve

unread,
Apr 27, 2006, 12:22:22 AM4/27/06
to
Yes. You can have local and remote connections in the same process.

To allow remote connections, you must instantiate a DataStoreServer
component and call its start method. This causes the server to run in your
process and listen for remote connections.

-Steve

"Brenton Camac" <b...@camacit.com> wrote in message
news:44457cfa$1...@newsgroups.borland.com...

Brenton Camac

unread,
Apr 27, 2006, 1:10:07 PM4/27/06
to Steve
Steve,
Thanks for you input. But as can be inferred from the question, I
already knew JDataStore can support local and remote connections in the
same process.

At any rate, I've figured it out. The documentation is very poor in
this area. Which meant I had to design test cases to find the answer.

rgds,
Brenton

Edwin Roestenburg

unread,
Jul 3, 2006, 4:08:46 AM7/3/06
to

So what exactly did you do? I'm using DataExpress (local connection to the datastore) and also try to remotely connect after having started DataStoreServer in the same application as where the local connection is used. It seems that the remote connection fails because the local connection keeps files locked. (Note that I am making a remote connection from within the same application, as I only need it for firing SQL queries and getting a ResultSet for passing on to JasperReports --> other solutions to this particular problem would be much appreciated).

Kind regards,

Edwin.

Steve Shaughnessy

unread,
Jul 9, 2006, 11:36:21 PM7/9/06
to
> My questions:
>
> 1. if remote access is enabled via running an in-process DataStore server,
> will the webapp still get local access via JDBC or will all access now go
> through the server thus degrade performance?

If you are using a jdbc url and "dslocal" is specified, a local connection
will be made regardless of whether the server is started in the same
process.

The same holds true if you use a JdbcDataSource with its setNetworkProtocol
property set to null.

>
> 2. how is the DataStore server configured to co-exist with local access?
> Can I initialize the DataStore server somehow with an existing
> DataStoreDriver instance or DataStoreConnection?

I'm not sure exactly what you are asking here. The DataStoreServer
component is the only way to start the server. There is no coexistence
issue for the DataStoreServer which provides remote access and local
connections. Internally, the DataStore server is "effectively" making local
connections to service all requests made from a remote connection.

0 new messages