Common features of Java Applications
- Database features
- Share knowledge
- Using Java to monitor database
Firstly I want to outline some common features of Java web application. These features will influence how a DBA manage his Oracle databases.
First one is a lot of Java applications only use basic Oracle developing functions. All the business logics reside in the middle tier.
Second one is most Java applications use connection pool to cache the connection to databases. Those connections often cross the network.
Third one is that with the popularity of the object-relation-mapping (ORM) tools, Java applications are able to generate SQL, which can be either good news or bad news for DBAs.
Last one is that since it is a n-tier application and any part of this link can be a bottleneck, can be a problem.
Install what you need only
Nowadays, Java developer community is talking about vendor independent. They want their Java applications independent of hardwares, operation systems, databases and even Java application servers. So a Java application wont use such Oracle features like store procedures, triggers , jobs, etc. They only use tables, views, sequences.
This is good for DBA. Most of Oracle recommended components like Java Virtual Machine (JVM), Text, XML wont be used at all. You should choose not to use them when creating the database. This will make the database small and easy to maintain , to upgrade.
I once upgraded two database from 9i to 10g. One has JVM installed and one does not. The one with JVM took more than 2 times longer than the one without.
Consider logical standby database for high availabilityLogical standby database is difficult to maintain. I think everyone agree on this. Because Java application often only use tables, views and sequences, it is relatively easy for logical standby to replicate.
Logical standby database has unique advantages over physical standby.
- First you can use it as a reporting server, thus off-load the traffic to primary servers
- Second you can do rolling upgrade. You can upgrade standby server first, do a switchover, then upgrade old primary server, then do a switchover. For oracle 10g, you can do a major upgrading, from 10g R1 to 10g R2. According to Oracle, you can even upgrade from 10g to 11g. This will achieve zero downtime. Very appealing to environment requiring high availability.
- Another very useful point is that you can make logical standby work as a test server as well. You can use the command “alter database guard standby”. This will prevent the developer from modify the replication from primary. However, they can create new schema on standby database and do various testing.
The server use for standby database usually has very similar power as primary, the test is very close to product environment.
Since you have to maintain this logical standby database, so making it as a test server wont add too much extra cost to you. You can reduce the number of test servers.