Posts tagged jdbc
Creating a EIS ConnectionFactory in your Database Adapter can be done with the WebLogic Administration Console, but of course this is also “scriptable”. What I needed was a script that created a Data Source with EIS Connection factory bound to the specific datasource.
First I created a properties file, let’s call it DsCf.properties. Everything between <> should be replaced with your own values:# Propertie file for creating datasource and EIS DB Adapter # Created by Michel Schildmeijer # Domain settings domainname="<your WLS DOMAIN>" adminurl=<WLS HOST:Admin Port> adminusername=weblogic adminpassword=<passwd weblogic> #datasource settings datasourcename=<Name DataSource> datasourcedatabasename=<database> datasourcetarget=<targeted manaegd server> datasourcefilename= datasourcename + '.xml' datasourcejndiname= 'jdbc/' + datasourcename datasourcedriverclass=oracle.jdbc.OracleDriver datasourceurl=jdbc:oracle:thin:@<db host>:1521:<db sid> datasourceusername=<db user> datasourcepassword=<db user password datasourcetestquery=SQL SELECT * FROM DUAL #EIS Connection Factory settings connfactname=eis/DB/<Connection factory More >
Where as in WebLogic 11g JPA was not support by default, in WebLogic 12c it is the default persistency provider.JPA 2.0 is part of JAVA EE 6.
I was trying some new JAVA EE 6 features in WebLogic 12c, so here is a is a way to create a Web Application with JPA under WebLogic 12c
Some of the JAVA EE 6 specifications weâ€™re already supported in WebLogic 11g. JPA 2.0 was one of them. Though version 1.0 was the default. 2.0 also worked.Unless an explicit <provider>…</provider> wass specified in the persistence.xml file of a deployed application, WebLogic 11g used OpenJPA/Kodo by default.
The default JPA provider setting is exposed via a new MBean: JPAMBean on the DomainMBean, and persists the configuration into the config.xml file.
Furthermore, you needed to install the patch QWG8 – Enable JPA 2.0 support on WebLogic Server.
To make it work on 11g, you had to use Oracle TopLink as the persistency provider like the image shows youÂ in the WebLogic Admin Console
Now for 12c this is not needed anymore, TopLink will be the default JPA Provider
Oracle & JDBC – Passing a 'table of custom object type' to a stored procedure – implementing efficient single round trip data exchange (part two of an ADF application on a PL/SQL API)
One very efficient way of passing data from the Java application to the database is through the use of custom Oracle Types. Even when we want to send a heterogeneous data set, for example a data set with master and details records, custom type based objects can provide a powerful exchange of data. However, also one that is not extremely straightforward to get started with. In this article an example of how to send a TABLE OF MY_TYPE objects as an input parameter to a stored PL/SQL procedure. (more…)