I created a table at the internal JCS instance, and tried to create a web service to insert the data into the table. It's a simple insert operation, so I prefer to coding it without JPA or ADF business component.
So far, the web service works, but it can't connect to database service.
Here is my code snippet of the web service method which deployed on JCS, and the jndi name is database,
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("database");
conn = ds.getConnection();
String sql = "insert into bvrequest(user_id,activity) values(?,?)";
pstmt = conn.prepareStatement(sql);
The thrown exception is,
weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool database to allocate to applications, please increase the size of the pool and retry..
Is it a correct way to use Database Cloud Service? Any suggestion/comment is welcome.
Hi Paula -
I think you need to ask this question in the Java Cloud Service forum. If you are trying to make a connection to a Database Cloud Service from Java outside the Oracle Public Cloud, you cannot do it with JDBC. You can only use RESTful Web Services from outside the Oracle Public Cloud to access the Oracle Database Cloud.
Hope this helps.
- Rick Greenwald