db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Problem with Derby Embedded Server
Date Thu, 29 Oct 2009 12:22:48 GMT
balcerman wrote:
> OK I did it :D
> the problem is that setting the property
> derby.drda.startNetworkServer=true
> doesnt work to me, but when I added the following lines to my application:
> import org.apache.derby.drda.NetworkServerControl;
> import java.net.InetAddress;
> NetworkServerControl server = new NetworkServerControl
> 	(InetAddress.getByName("localhost"),1527);
> server.start(null);


Good to see that you made it work :)
I believe it should work by setting the properties as well.
Did you specify the property (or properties) in the derby.properties 
file, or as Java system properties (either on the command line or using 
System.setProperty *before* the JDBC driver is loaded)?

If you used the file, maybe it was located in the wrong place such that 
the properties in it didn't get loaded?

> the Derby started to work as embedded server (which means that it is started
> by the application that contains these lines above and stopped while this
> application disconnects from Derby) but additionally you can connect to it
> via the port 1527, as in Network Server case :)
> So the problem is solved to me.

View raw message