If the application does not use any Oracle specific features I see no problem to change the classes12.jar to ojdbc#.jar.
This should work without any codechange for the most of applications because the JEE app should not access the DB connections directly.
Even if there are some Oracle optimizations, I do such in an application, it works also without any change of code.
I recommend to use JBoss 5.1 with Java6 and a new ojdbc driver.