AW: [OJB-developers] ERROR: Server configuration denies access to data source
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-02-19 09:49:30
|
Hi Ricardo, > > Hello, > > Since OJB is performing REALLY slowly, I tried to add the > next tag to my repository.xml file: > > <class.proxy>dynamic</class.proxy> > > in every <ClassDescriptor> tag. > > All my objects implement an interface, so this theorically > should work fine. > That's the only thing I changed in this file, and now I'm > getting this strange exception: > [DEFAULT] ERROR: Server configuration denies access to data source > java.sql.SQLException: Server configuration denies access to > data source > at org.gjt.mm.mysql.MysqlIO.init(Unknown Source) > at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) > at > org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source) > at org.gjt.mm.mysql.Driver.connect(Unknown Source) > at > java.sql.DriverManager.getConnection(DriverManager.java:517) > at > java.sql.DriverManager.getConnection(DriverManager.java:177) > at > ojb.broker.accesslayer.ConnectionFactoryDefaultImpl.newConnection(Con > nectionFactoryDefaultImpl.java:72) <snip> OK this exception is raised during the materilization of a proxy. But the error is NOT Proxy related at all. You get an Error from the the MySQL driver. I'm not a MySQL expert thus I can't help here. > > > -------------------------------------------------------------- > ------------ > > After a LOT of these messages: > > [DEFAULT] WARN: problems with platform > ojb.broker.platforms.PlatformMySQLImpl: > ojb.broker.platforms.PlatformMySQLImpl > [DEFAULT] WARN: OJB will use PlatformDefaultImpl instead > This is totally harmless. It just tells you that OJB does not use any MySql specific PlatForm code. > > > Do you have any idea of what's might the problem be? IMHO this is a MySQL specific problem. > Besides this, how can I make OJB perform faster? > Mhh. Of course using an O/R layer has a certain impact on performance. If you are using handcoded JDBC and handcoded mappings you can do things much faster. There is nothing like a free lunch ! But: has been carefully designed to minimize the performance impact. There is a special JUnit target 'performance' By calling 'build.sh performance' you can execute the OJB performance testsuite. The testsuite runs to tests: 1. running five tescenarios using OJB 2. running the same scenarios with manual coded JDBC calls. If you are executing it out of the box the tests are executed against the HSQLDB database that ships with OJB. You will see that the OJB mode is about half as fast as the native JDBC mode. (For instance inserting 10.000 Objects takes about 2500 msecs using JDBC and about 5000 msecs using OJB on one of my machines.) This sounds bad. But you have to take in account that HDSQL does everything in memory and that there is no network overhead involved. Now just change the target database (in the repository.xml) to say MS access and you will see a totally different picture: Inserting 10.000 object via JDBC takes 50.000 msecs and 52.500 msecs using OJB. You see: the absolute OJB overhead remains the same but the factor OJB/JDBC decreases enormously. Please try this performance test against your target database and tell us your exact results. I am almost sure that your results will look quite similar! On the other hand: There has been a lot of work on OJB internals in the last months and it may well be that these refactorings had a negative performance impact. This must be carefully checked! We will need another performance tuning code-walkthrough before we can release OJB 1.0. HTH, Thomas > > Thanks in advance! > > Ricardo Arguello > > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |