Regd. Connection URL and Database Classname
Hi! All,
Can anyone help in the following mentioned below related issues:
I have created a stand-alone report template in CR-XI-R2 and using command passed the query to bring the resultset.
While bringing the resultset from network database from SIT and UAT, I need to pass "Connection URL" and "Database Classname" information to Crystal Report template file and need to hardcode, as for connection I have used JNDI-JDBC type and need to use that only.
How to avoid that hard coding issue? Please reply asap.
Please give a reply to Email id [email protected] also.
Regards,
Biplab Kumar Sarkar
+65 - 9398 2100
Assuming you are changing the database location at runtime, if you are using strictly JDBC then you will need to hard code the connection url and class name.
To avoid hard coding you potentially could use a JNDI connection which hides all of that on your application server. Or you could store the JDBC connection information in a properties file, and access the properties in your application, so at least the information is covered by a layer.
Similar Messages
-
So I have tried to download several apps and it asks for my password. I type in my password and then it comes up failure to find service connection URL. After clicking retry multiple times it comes up and say my password is incorrect. When I logged in here my password is correct. How do I fix this
Hi, Taterbug17.
I would recommend signing out of the iTunes Store on your iOS device and sign back in. Here are the steps on how to process these steps.
iOS: Changing the signed-in iTunes Store Apple ID account
http://support.apple.com/kb/ht1311
Cheers,
Jason H. -
Connection Pool and Database Sessions
Hi,
Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?
Thanks,
VinodHi,
Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?Hi Vinod,
Yes, TopLink allows you to use the app server's connection pooling and transaction services. Chapter 2 of the Oracle9iAS TopLink Foundation Library Guide provides details as do the TopLink examples. The easiest way to set this up is by using the sessions.xml file. The sample XML below is from the file <toplink903>\examples\ias\examples\ejb\sessionbean\sessions.xml. Here we are adding the datasource defined in OC4J and specifying that we are using the OC4J transaction controller also.
<login>
<user-name>sa</user-name>
<password></password>
<datasource>java:comp/env/jdbc/ejbJTSDataSource</datasource>
<uses-external-transaction-controller>true</uses-external-transaction-controller>
<uses-external-connection-pool>true</uses-external-connection-pool>
</login>
<external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
When using this approach you need to change your TopLink code slightly in the EJB methods:
a. Acquire the ACTIVE unit of work from the server
session (again, see the EmployeeSessionEJB code
example) with something like:
UnitOfWork uow = clientSession.getActiveUnitOfWork();
b. Calls to uow.commit() can be ommitted or commented out
because the EJB will handle this. Note that of course
the methods you create in the EJB that are using this
approach must have TX Required (default).
Hope this helps.
Pete -
Oracle Application server connection pool and database links
I am using Oracle application server 10g with connection pools, the db used by the application connects to another oracle db using a database link. My question is when the application starts it creates 10 connections, does it also create x amount of database links as well?
Hi,
Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?Hi Vinod,
Yes, TopLink allows you to use the app server's connection pooling and transaction services. Chapter 2 of the Oracle9iAS TopLink Foundation Library Guide provides details as do the TopLink examples. The easiest way to set this up is by using the sessions.xml file. The sample XML below is from the file <toplink903>\examples\ias\examples\ejb\sessionbean\sessions.xml. Here we are adding the datasource defined in OC4J and specifying that we are using the OC4J transaction controller also.
<login>
<user-name>sa</user-name>
<password></password>
<datasource>java:comp/env/jdbc/ejbJTSDataSource</datasource>
<uses-external-transaction-controller>true</uses-external-transaction-controller>
<uses-external-connection-pool>true</uses-external-connection-pool>
</login>
<external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
When using this approach you need to change your TopLink code slightly in the EJB methods:
a. Acquire the ACTIVE unit of work from the server
session (again, see the EmployeeSessionEJB code
example) with something like:
UnitOfWork uow = clientSession.getActiveUnitOfWork();
b. Calls to uow.commit() can be ommitted or commented out
because the EJB will handle this. Note that of course
the methods you create in the EJB that are using this
approach must have TX Required (default).
Hope this helps.
Pete -
Options to connect SQL Server database securely
Hello All,
I am working on one of desktop application and requires very high security features related to database. One thing I require is do not want to store connection string in computer where application is installed i.e(App.Config) file.
Also do not want to store it securely because during connection establish anyone can sniff the traffic and may capture whole connection string and so SQL server.
One solution to my problem is build web service layer so that we do not need to concern about database connection. However as I am in middle of development, this option seems last hope for me.
So I required help about another options that can fulfill my requirement security about SQL server connection string and database.
Anyone having any idea?
Regards,
Dharmesh SolankiHi dmsolanki,
This forum is to discuss problems of C# development. Your question is not related to the topic of this forum. So I suggestion you post the question in the SQL SERVER forums at
http://social.msdn.microsoft.com/Forums/en-US/home?forum=sqlsecurity
It is appropriate and more experts will assist you.
Thanks.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Any risks if call interface and database not matched?
hi experts,
are there any risks if the call interface of connection pool and database (in physical layer) matched ?
for example,
the call interface of connection pool (in physical layer) is selected to "OCI 10g/11g"
the database (in physical layer) is selected to "Oracle 10g R2/11g"
the oracle client on my local computer is "Oracle - OraClient10g"
and the database version is "9.2.0.7.0" (select * from nls_database_parameters where parameter = 'NLS_RDBMS_VERSION'; )
thank you very much!There shouldn't be a problem, the OCI is backward compatible.
regards
John
http://obiee101.blogspot.com -
Database connection encryption and integrity with ColdFusion and Oracle thin client
As ColdFusion datasource we are using the Oracle thin client to connect with the database. So, basically we are using a JDBC URL such as jdbc:oracle:thin:@... and as Driver Class oracle.jdbc.OracleDriver. This works successfully however we would like to set encryption and integrity parameters as well. In Java this is done similarly by setting a Properties object prior to getting a connection as follows:
Properties prop = new Properties();
prop.put("oracle.net.encryption_client", "REQUIRED");
prop.put("oracle.net.encryption_types_client", "( DES40 )");
prop.put("oracle.net.crypto_checksum_client", "REQUESTED");
prop.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
OracleDataSource ods = new OracleDataSource();
ods.setProperties(prop);
ods.setURL("jdbc:oracle:thin:@localhost:1521:main");
Connection conn = ods.getConnection();
Is there a way that I can pass these parameters to the ColdFusion datasource. Ideally, I would love to do this centrally in such way that a change to all the cfquery or cfstoredproc is not needed.
I also know that in application servers such as Oracle AS there is an option when creating a datasource which says "Add Properties". In there you can add such properties. So, I was thinking of maybe creating a JNDI DS in the app. server and then magically connecting to it but this may have some impacts on the app.
Besides this I was also thinking of communicating with the CF datasource through the CF admin API (cfide.adminapi.administrator) and also the option of extending the Oracle driver so that when CF connects with it these params are already set.
I would love to have your professional opinion and suggestions on this.I believe the thin driver actually needs the IP address (not the DNS name). Also, is "java" the name of the Oracle instance to which you are trying to connect?
Try the following:String driver = "jdbc:oracle:thin";
String dbIP = "W2RZ1NXG01's IP address";
String dbPort = "1530";
String dbSid = "java";
String dbUser = "Admin";
String dbPswd = "apassword";
String cnctStr = driver + ":@" + dbIP + ":" + port + ":" + dbSid;
try
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection( cnctStr, dbUser, dbPswd );
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
catch(SQLException ex)
System.err.println( "The following SQLException occurred: " + ex );
System.err.println( "Message: " + ex.getMessage() ); -
I want to connect to remote databases which can be specified by URL
Hi,
i'm tinu
I want to connect to remote databases which can be specified by URL
the database is ORACLE 9i
pls help me, how to connect to it
i have the ip address,port address,sid,username and password of the database
is there any difference in the actual code of database connection
plss helpHi,
There is a particular example with MS SQL 2000 in thread http://forum.java.sun.com/thread.jspa?threadID=608314
In the given example you just need to change the database URL and the JDBC driver. Just examine the code a little bit.
Also you may wish to visit the SUN's JDBC tutorial on http://java.sun.com/docs/books/tutorial/jdbc/
Ferad Zyulkyarov -
A problem to connect to my database and to insert a line into it.
I can't connect to my database there's an error
in my index file i have written this code:
<?php
mb_http_input("iso-8859-1");
mb_http_output("iso-8859-1");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Formulaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Miseenforme" href="Miseenforme.css" />
<style type="text/css">
@import url("ModuleStyleSheets.css");
</style>
<link href="CSS/colors5.css" rel="stylesheet" type="text/css" />
<style type="text/css">
h1 {
font-size: xx-large;
#corps form p {
font-size: 24px;
text-align: left;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
#corps form p br {
font-family: Palatino Linotype, Book Antiqua, Palatino, serif;
font-size: 24px;
#corps form p label {
text-align: left;
#corps form p label {
text-align: left;
</style>
<link href="CSS/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="corps">
<form action="creation.php" method="post" enctype="multipart/form-data">
<p><!-- #BeginDate format:fcAm1 -->Friday, August 23, 2013<!-- #EndDate -->
</p>
<p> </p>
<table width="500" border="1" align="center" cellpadding="2" cellspacing="2">
<tr>
<th width="500" align="center" bgcolor="#66FFFF" scope="row">SAISIE DES DONNEES ADMINISTRATIVES DU FIDELE</th>
</tr>
</table>
<p> </p>
<p>
<label>Nom</label>
<input type="text" name="Nom"/> <br/>
<label>Prenom</label> : <input type="Prenom:" name="Prenom"/> <br/>
<label>Adresse</label> :</br> <textarea type="text" name="Adresse" rows="8" cols="25"></textarea> <br/>
<label>codepostal</label> : <input type="codepostal" name="codepostal"><br>
<label>Ville</label> : <input type="text" name="Ville"/> <br/>
<label>Commentaires</label> : <textarea type="text" name="Commentaires" rows="8" cols="25"></textarea> <br/>
<label>Don</label>: <select name="don">
<option value="chabat">chabat</option>
<option value="rochhachana">roch hachana</option>
<option value="kippour">kippour</option>
<option value="souccot">souccout</option>
<option value="simhatthorah">simhat thorah</option>
<option value="pessah">simhat thorah</option>
<option value="chavouot">chavouot</option>
</select>
</p>
<p>Montant :
</label><input type="number" name="montant" style="color:#33C; background-color:#F60;
font-size:36px"/> <br/>
</p>
<p>
<input name="Submit" type="submit" value="Submit" /> <input type="reset"/>
</p>
</form>
</div>
</body>
</html>
and in my creation.php which is the name of the action form there's the following code:
creation.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title> Envoie des données </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Miseenforme" href="Miseenforme.css" />
</head>
<body>
<p>
<?php
define('DB_SERVER', 'localhost'); // serveur mysql
define('DB_SERVER_USERNAME', 'localhost@localhost'); // nom d utilisateur
define('DB_SERVER_PASSWORD', ''); // mot de passe
define('DB_DATABASE', fideles); // nom de la base
$Nom=$_POST['Nom'];
$Prenom=$_POST['Prenom'];
$Adresse=$_POST['Adresse'];
$Lien=$_POST['Lien'];
$Image=$_FILES['Image'];
$Ville=$_POST['Ville'];
$Cd_post=$_POST['Cd_post'];
$Commentaires=$_POST['Commentaires'];
$montantT=$_POST['Montant'];
$db=mysql_connect("localhost","localhost@localhost","")or die("Erreur de connexion au serveur");
mysql_select_db("fideles",$db)or die ("Erreur de connexion à la base FIDELES");
$MonSql="INSERT INTO 'fideles'(F_NOM, F_PRENOM,F_ADRESSE, F_CD_POST, DON,F_comment, F_VILLE,F_MONTANT) VALUES('$Nom','$Prenom','$Adresse','$Cd_post','$Don','$Commentaires','$Ville','$Montant') ";
$res=mysql_query($MonSql);
if (!$res && mysql_errno() == 1062)
echo 'Ce titre existe déjà, l\'enregistrement a échoué.';
mysql_close($db);
?>
<a href="Formulairemodif.php">Creation d un évènement </a>
<table border="4" color="black">
<caption>Fiche</caption>
<thead>
<tr border="5">
<th width="100">Nom</th>
<th width="141">Prenom</th>
<th width="102">Adresse</th>
<th width="78">Don</th>
<th width="77">Code postal</th>
<th width="79">Ville</th>
<th width="139">Commentaires</th>
<th width="104">Montant</th>
</tr>
</thead>
<tbody>
<tr>
</tr>
</tbody>
</table><br/>
<h3><a href="Formulairemodif.php"> Modifier un évènement </a></h3> <h3><a href="supprimer.php"> Supprimer un évènement </a></h3>
</p>
</body>
</html>
Tell me where is my error
Thank you>I can't connect to my database there's an error
What error?
Also, this post belongs in the app dev forum. -
Losing a part of a database connection url
After creating a database connection and specifying the related url I can connect with the database.
After closing and restarting JDEV a part of this url is lost. So everytime I start JDEV i have to fill-in in the url again.
I was wondering, this database connection is sotred in a file, does anyone know which file ? So i can make it read-only !I found the file: IDEconnections.xml
The url is correct in this file, but in JDEV it is parsed incorrectly I assume
jdbc:mysql://localhost:3306/mov?ultraDevHack=true&user=root&password=admin
Only password=admin is used in JDEV after restarting.
I have logged an iTAR on Metalink as I assume it's a bug. -
(IMP)Application module and database connection
Hi,
How application module pooling and database connection pooling is working ?
Currently i m facing a problem like if i am creating 10 browser session then it doesn't mean that i'll have only 10 db sessions. While closing the browser session of application module time out respective db session is not removed.
In this case, invalid db session are created in bulk which is crashing database sometime. We have writter script to kill those session periodically but in this case if application module is accessing such dbconnection then we are getting session killed error or not logged in error.
To over come we need to bounce the server (middle tier).
Is there any proper way to solve this or am i doing something wrong ?
Please let me know if you need any more details.
Thanks in advance
DevangThanks for your prompt reply Ricky.
I just found out that in some of the JSP pages in application
<jbo:ReleasePageResources/> is not written. Should this problem arise because of this?
could you please tell me how can I release page resources in UIX pages ?
Datasources.xml file content
<data-source class="com.evermind.sql.DriverManagerDataSource"
name="AITDS"
location="jdbc/AITCoreDS"
pooled-location="jdbc/pooled/AITPDS"
xa-location="jdbc/xa/AITXADS"
ejb-location="jdbc/AITDS"
connection-driver="oracle.jdbc.driver.OracleDriver"
username=<USERNAME>
password=<PASSWORD>
url=<URL>
inactivity-timeout="30"
/>
bc4j.xcfg file
<BC4JConfig>
<AppModuleConfigBag>
<AppModuleConfig name="GsaServerModuleLocal">
<DeployPlatform>LOCAL</DeployPlatform>
<JDBCDataSource>jdbc/AITCoreDS</JDBCDataSource>
<jbo.project>gsa</jbo.project>
<AppModuleJndiName>oracle.appsit.gsa.server.GsaServerModule</AppModuleJndiName>
<java.naming.factory.initial>oracle.jbo.common.JboInitialContextFactory</java.naming.factory.initial>
<ApplicationName>oracle.appsit.gsa.server.GsaServerModule</ApplicationName>
</AppModuleConfig>
</AppModuleConfigBag>
</BC4JConfig>
Let me know if you need any more detail.
Thanks in advance
Devang -
Performance with MySQL and Database connectivity toolbox
Hi!
I'm having quite some problems with the performance of MySQL and Database connectivity toolbox. However, I'm very happy with the ease of using database connectivity toolbox. The background is:
I have 61 variables (ints and floats) which I would like to save in the MySQL-database. This is no problem, however, the loop time increases from 8ms to 50ms when using the database. I have concluded that it has to do with the DB Tools Insert Data.vi and I think that I have some kind of performance issue with this VI. The CPU never reach more the 15% of its maximum performance. I use a default setup and connect through ODBC.
My questions are:
1. I would like to save 61 variables each 8-10ms, is this impossible using this solution?
2. Is there any way of increasing the performance of the DB Tools Insert Data.vi or use any other VI?
3. Is there any way of adjusting the MySQL setup to achieve better performance?
Thank you very much for your time.
Regards,
MattiasFirst of all, thank you very much for your time. All of you have been really good support to me.
>> Is your database on a different computer? Does your loop execute 61 times?
Database is on the same computer as the MySQL server.
The loop saves 61 values at once to the database, in one SQL-statement.
I have now added the front panel and block diagram for my test-VI. I have implemented the queue system and separate loops for producer and consumer. However, since the queue is building up faster then the consumer loop consumes values, the queue is building up quite fast and the disc starts working.
The test database table that I add data to is created by a simple:
create table test(aa int, bb char(15));
...I'm sure that this can be improved in some way.
I always open and close the connection to the database "outside the loop". However, it still takes some 40-50 ms to save the data to the database table - so, unfortunatly no progress to far. I currently just want to save the data.
Any more advise will be gratefully accepted.
Regards,
Mattias
Message Edited by mattias@hv on 10-23-2007 07:50 AM
Attachments:
front panel 2.JPG 101 KB
block diagram.JPG 135 KB -
I receive REP-0501: Unable to connect to specified database. I run developer 6i application on windows 2008 r2. I have applied the nn60.dll and nnb60.dll files to the \BIN directory. The forms are working fine. The reports will only display after the correct user id (username, password and database connection string) is supplied. This is happening to all attempts to open already complied form. Pls, help.
If you are connecting to an Oracle 11g database, remember that by default the passwords are case sensitive. To disable that, run
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE; -
Connection pooling and auditing on an oracle database
Integration of a weblogic application with an oracle backend,
Connection pooling, and auditing ,2 conflicting requirements ?
Problem statement :
We are in the process of maintaining a legacy client server application where
the client is
written in PowerBuilder and the backend is using an Oracle database.
Almost all business logic is implemented in stored procedures on the database.
When working in client/server mode ,1 PowerBuilder User has a one-to-one relation
with
a connection(session) on the oracle database.
It is a requirement that the database administrator must see the real user connected
to the database
and NOT some kind of superuser, therefore in the PowerBuilder app each user connects
to the database
with his own username.(Each user is configured on the database via a seperate
powerbuilder security app).
For the PowerBuilder app all is fine and this app can maintain conversional state(setting
and
reading of global variables in oracle packages).
The management is pushing for web-based application where we will be using bea
weblogic appserver(J2EE based).
We have build an business app which is web-based and accessing the same oracle
backend app as
the PowerBuilder app is doing.
The first version of this web-based app is using a custom build connector(based
on JCA standard and
derived from a template provided by the weblogic integration installation).
This custom build connector is essentially a combination of a custom realm in
weblogic terms
and a degraded connection pool , where each web session(browser) has a one-to-one
relation
with the back end database.
The reason that this custom connector is combining the security functionality
and the pooling
functionality , is because each user must be authenticated against the oracle
database(security requirement)
and NOT against a LDAP server, and we are using a statefull backend(oracle packages)
which would make it
difficult to reuse connections.
A problem that surfaced while doing heavy loadtesting with the custom connector,
is that sometimes connections are closed and new ones made in the midst of a transaction.
If you imagine a scenario where a session bean creates a business entity ,and
the session bean
calls 1 entity bean for the header and 1 entity bean for the detail, then the
header and detail
must be created in the same transaction AND with the same connection(there is
a parent-child relationship
between header and detail enforced on the back end database via Primary and Foreing
Keys).
We have not yet found why weblogic is closing the connection!
A second problem that we are experincing with the custom connector, is the use
of CMP(container managed persistence)
within entity beans.
The J2EE developers state that the use of CMP decreases the develoment time and
thus also maintenance costs.
We have not yet found a way to integrate a custom connector with the CMP persistence
scheme !
In order to solve our loadtesting and CMP persistence problems i was asked to
come up with a solution
which should not use a custom connector,but use standard connection pools from
weblogic.
To resolve the authentication problem on weblogic i could make a custom realm
which connects to the
backend database with the username and password, and if the connection is ok ,
i could consider this
user as authenticated in weblogic.
That still leaves me with the problem of auditing and pooling.
If i were to use a standard connection pool,then all transaction made in the oracle
database
would be done by a pool user or super user, a solution which will be rejected
by our local security officer,
because you can not see which real user made a transaction in the database.
I could still use the connection pool and in the application , advise the application
developers
to set an oracle package variable with the real user, then on arrival of the request
in the database,
the logic could use this package variable to set the transaction user.
There are still problems with this approach :
- The administrator of the database can still not see who is connected , he will
only see the superuser connection.
- This scheme can not be used when you want to use CMP persistence , since it
is weblogic who will generate the code
to access the database.
I thought i had a solution when oracle provided us with a connection pool known
as OracleOCIConnectionPool
where there is a connection made by a superuser, but where sessions are multiplexed
over this physical pipe with the real user.
I can not seem to properly integrate this OCI connectionpool into weblogic.
When using this pool , and we are coming into a bean (session or entity bean)
weblogic is wrapping
this pool with it's own internal Datasource and giving me back a connection of
the superuser, but not one for the real user,
thus setting me with my back to the wall again.
I would appreciate if anyone had experienced the same problem to share a possible
solution with us
in order to satisfy all requirements(security,auditing,CMP).
Many Thanks
Blyau Gino
[email protected]Hi Blyau,
As Joe has already provided some technical advice,
I'll try to say something on engineering process level.
While migrating an application from one technology to
other, like client-server to n-tier in you case, customers and
stakeholders want to push into the new system as many old
requirements as possible. This approach is AKA "we must
have ALL of the features of the old system". Mostly it happens
because they don't know what they want. Ad little understanding
of abilities of the new technology, and you will get a requirement
like the one you have in you hands.
I think "DBA must see real user" is one of those. For this
type of requirements it can make sense to try to drop it,
or to understand its nature and suggest alternatives. In this
particular case it can be a system that logs user names,
login and logout times.
Blind copying of old features into an incompatible new architecture
may endanger the whole project and can result in its failure.
Hope this helps.
Regards,
Slava Imeshev
"Blyau Gino" <[email protected]> wrote in message
news:[email protected]...
>
Integration of a weblogic application with an oracle backend,
Connection pooling, and auditing ,2 conflicting requirements ?
Problem statement :
We are in the process of maintaining a legacy client server applicationwhere
the client is
written in PowerBuilder and the backend is using an Oracle database.
Almost all business logic is implemented in stored procedures on thedatabase.
When working in client/server mode ,1 PowerBuilder User has a one-to-onerelation
with
a connection(session) on the oracle database.
It is a requirement that the database administrator must see the real userconnected
to the database
and NOT some kind of superuser, therefore in the PowerBuilder app eachuser connects
to the database
with his own username.(Each user is configured on the database via aseperate
powerbuilder security app).
For the PowerBuilder app all is fine and this app can maintainconversional state(setting
and
reading of global variables in oracle packages).
The management is pushing for web-based application where we will be usingbea
weblogic appserver(J2EE based).
We have build an business app which is web-based and accessing the sameoracle
backend app as
the PowerBuilder app is doing.
The first version of this web-based app is using a custom buildconnector(based
on JCA standard and
derived from a template provided by the weblogic integrationinstallation).
This custom build connector is essentially a combination of a custom realmin
weblogic terms
and a degraded connection pool , where each web session(browser) has aone-to-one
relation
with the back end database.
The reason that this custom connector is combining the securityfunctionality
and the pooling
functionality , is because each user must be authenticated against theoracle
database(security requirement)
and NOT against a LDAP server, and we are using a statefull backend(oraclepackages)
which would make it
difficult to reuse connections.
A problem that surfaced while doing heavy loadtesting with the customconnector,
>
is that sometimes connections are closed and new ones made in the midst ofa transaction.
If you imagine a scenario where a session bean creates a business entity,and
the session bean
calls 1 entity bean for the header and 1 entity bean for the detail, thenthe
header and detail
must be created in the same transaction AND with the same connection(thereis
a parent-child relationship
between header and detail enforced on the back end database via Primaryand Foreing
Keys).
We have not yet found why weblogic is closing the connection!
A second problem that we are experincing with the custom connector, is theuse
of CMP(container managed persistence)
within entity beans.
The J2EE developers state that the use of CMP decreases the develomenttime and
thus also maintenance costs.
We have not yet found a way to integrate a custom connector with the CMPpersistence
scheme !
In order to solve our loadtesting and CMP persistence problems i was askedto
come up with a solution
which should not use a custom connector,but use standard connection poolsfrom
weblogic.
To resolve the authentication problem on weblogic i could make a customrealm
which connects to the
backend database with the username and password, and if the connection isok ,
i could consider this
user as authenticated in weblogic.
That still leaves me with the problem of auditing and pooling.
If i were to use a standard connection pool,then all transaction made inthe oracle
database
would be done by a pool user or super user, a solution which will berejected
by our local security officer,
because you can not see which real user made a transaction in thedatabase.
I could still use the connection pool and in the application , advise theapplication
developers
to set an oracle package variable with the real user, then on arrival ofthe request
in the database,
the logic could use this package variable to set the transaction user.
There are still problems with this approach :
- The administrator of the database can still not see who is connected ,he will
only see the superuser connection.
- This scheme can not be used when you want to use CMP persistence , sinceit
is weblogic who will generate the code
to access the database.
I thought i had a solution when oracle provided us with a connection poolknown
as OracleOCIConnectionPool
where there is a connection made by a superuser, but where sessions aremultiplexed
over this physical pipe with the real user.
I can not seem to properly integrate this OCI connectionpool intoweblogic.
When using this pool , and we are coming into a bean (session or entitybean)
weblogic is wrapping
this pool with it's own internal Datasource and giving me back aconnection of
the superuser, but not one for the real user,
thus setting me with my back to the wall again.
I would appreciate if anyone had experienced the same problem to share apossible
solution with us
in order to satisfy all requirements(security,auditing,CMP).
Many Thanks
Blyau Gino
[email protected] -
Listener EA2: database connection pool and connection revalidation
Hi all,
As one can expect from early adopter release there could be some bugs but I can't find any references in forum to my situation:
* My 11g XE database and listener are starting as windows services when server boots operating system (Windows Server 2003 R2).
* I configured my web server (unsupported Jetty 9.0.0.M1) to start as windows service when operating system starts.
* Apex Listener 2.0.0.268.17.05 configured to connect with XE using JDBC thin driver with default settings (initial pool size 3, max statements 10, min connections 1, max connections 10, inactivity timeout 1800, abandoned connection timeout 900)
* Because web server starts a bit faster than Oracle database when apex connects first time it gets "ORA-12528, TNS:listener: all appropriate instances are blocking new connections" (could be that database still starting but already registered service with listener)
* From listener.log file I can see that all further connections made from Apex listener succeeds
* When I try to open any apex page with browser I am getting 404 error and apex listener logs error (*time is 2 days after system startup*):
2012-11-30 3:56:02 PM oracle.dbtools.common.config.db.DatabaseConfig badConfiguration
SEVERE: The pool named: apex is not correctly configured, error: Listener refused the connection with the following error:
ORA-12528, TNS:listener: all appropriate instances are blocking new connections
ConnectionPoolException [error=BAD_CONFIGURATION]
at oracle.dbtools.common.jdbc.ConnectionPoolException.badConfiguration(ConnectionPoolException.java:62)
at oracle.dbtools.common.config.db.DatabaseConfig.badConfiguration(DatabaseConfig.java:146)
at oracle.dbtools.common.config.db.DatabaseConfig.createPool(DatabaseConfig.java:168)
at oracle.dbtools.common.config.db.DatabaseConfig.getConnection(DatabaseConfig.java:68)
at oracle.dbtools.common.jdbc.ora.OraPrincipal.connection(OraPrincipal.java:25)
at oracle.dbtools.apex.ModApexContext.getConnection(ModApexContext.java:320)
at oracle.dbtools.apex.Procedure.getProcedure(Procedure.java:166)
at oracle.dbtools.apex.OWA.validateProcedure(OWA.java:384)
at oracle.dbtools.apex.security.Security.isValidRequest(Security.java:171)
at oracle.dbtools.apex.ModApex.validateRequest(ModApex.java:233)
at oracle.dbtools.apex.ModApex.doGet(ModApex.java:79)
at oracle.dbtools.apex.ModApex.service(ModApex.java:263)
at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:288)
at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:127)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:665)
<... Jetty web server stack ...>
at java.lang.Thread.run(Unknown Source)
2012-11-30 3:56:02 PM oracle.dbtools.rt.web.HttpEndpointBase modApex
* Oracle listener log for same time (no errors here):
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1078)) * establish * xe * 0
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1079)) * establish * xe * 0
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1080)) * establish * xe * 0
30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1081)) * establish * xe * 0
* For some reason apex listener keeps first connection status and won't try to establish new connection if first attempt finished with ORA-12528
* The same scenario is valid when at time of web server start oracle database/listener is not available - even if database and listener starts and apex successfully establishes further connections all apex pages gets 404 error
* If I restart web server windows service (while oracle db and listener still running) browser opens apex pages without errors and apex listener does not log any errors
* I know that I can avoid this error delaying start of web server windows service but it would be nice to have production release 2.x without such bugsHi,
Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?Hi Vinod,
Yes, TopLink allows you to use the app server's connection pooling and transaction services. Chapter 2 of the Oracle9iAS TopLink Foundation Library Guide provides details as do the TopLink examples. The easiest way to set this up is by using the sessions.xml file. The sample XML below is from the file <toplink903>\examples\ias\examples\ejb\sessionbean\sessions.xml. Here we are adding the datasource defined in OC4J and specifying that we are using the OC4J transaction controller also.
<login>
<user-name>sa</user-name>
<password></password>
<datasource>java:comp/env/jdbc/ejbJTSDataSource</datasource>
<uses-external-transaction-controller>true</uses-external-transaction-controller>
<uses-external-connection-pool>true</uses-external-connection-pool>
</login>
<external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
When using this approach you need to change your TopLink code slightly in the EJB methods:
a. Acquire the ACTIVE unit of work from the server
session (again, see the EmployeeSessionEJB code
example) with something like:
UnitOfWork uow = clientSession.getActiveUnitOfWork();
b. Calls to uow.commit() can be ommitted or commented out
because the EJB will handle this. Note that of course
the methods you create in the EJB that are using this
approach must have TX Required (default).
Hope this helps.
Pete
Maybe you are looking for
-
Firefox 5 not working on Dell Studio XPS
Firefox 5 installs without a problem but the tabs when you click on them will not open and right clicking a link to open in new tab doesn't work Dell Studio Xps 9100 Windows 7 Same with firefox 4.... 3.6.18 no problem
-
Potential new T61 user with some questions about product/su​pport/etc.
Hi all! I've been using Dell Latitude's for last 7+ years and been happy with them thus far, as I was able to stay within the C-series thru 3 systems and reuse some components such as batteries, CD-ROM, etc. but now that I'd have to go to D-series, t
-
5.0 to 5.1 problem: LiveType Media disk
You need all of your original 5.0 disks when you run the entire upgrade, not just the four new disks that Apple sends you. The installer called for LiveType Media Disk 1 and I put it into the G5. The drive spun up, chattered and spit out the disk. We
-
Procedure unhappy with order by params
Good day, I have the following procedure which is working correctly except it is ignoring the "sort" & "dir" params following the order by clause: create or replace PROCEDURE budgets_lookup (p_fields varchar2 default null ,p_query varchar2 default nu
-
What is the best way to Install ilife11 iDVD and iWeb onto an iMac with Maverick
Hi: I would like to purchase a new iMac. Since this does not come with iDVD or iWeb, I would like to install these two programs from my iLife11 DVD. Will this work? I assume I would have to do a custom install so I do not overide the newer versions o