datasource - JBoss Database Connection Pool -


I am new to jboss and I have been asked to include a jboss connection pooling system with an existing web application . Keeping in mind that the web application database layer is written properly that means all the results, statements and connections are being stopped properly, when it does not necessarily, whatever code I change in my web app, I Jebus data source is properly configured.

Can someone point me to a tutorial or a code sample that uses a jealous dietshore in the web app.

itemprop = "text">

How is the pool of jabos operated in Datasource configuration? Web APIs need to do JNDI lookup to get a database connection instead of a direct JDBC URL for the database, and then you will have pooling.

Transaction is another story, though.

Edit: In response to your comment about how to influence the code, this is what it looks like:

  string jndiPath = "java: dataSourceJNDIName "; // Precision Prefix There is a lot to do with clustering, etc. But if you are using a jbus example standalone, then it works reference CTX = new initial concerts (); Datasource DS = (Datasource) PortableRemoteObase. Enero (CTX. Lupup (Jandipath), Datasource Class.); Connection c = ds.getConnection (); Technically speaking PortableRemoteObject.narrow is not necessary to speak a JBoss (4.2.2 anyway) to ensure a single server configuration, but it is more appropriate J2EE standard code, because the normal application server is only suitable for a reference type Do not return the object. 

The issues that handle the above resource usage and error are not included. You want to close that context object, when you are done with it, and of course the database connection, though the Zebaus will scream you if you forget to close the database connection and the transaction ends, Closes for

Anyway, that connection object can be used just like DriverManager.getConnection (url);


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -