DataSource « Connection « JPA Q&A





1. how to use hibernate as the datasource within the JTablemodel    stackoverflow.com

I would like to do something similar to the following (which is using jdbc as the datasource in the table model) but with hibernate. How do I go about it please? Thanks

  ...

2. How to use more than one data sources in JPA    stackoverflow.com

I want to use two data sources at same time and use them based on the condition. Can I add multiple data sources in persistence.xml like:

<jta-data-source>gov/v3/jdbc/dataSource1</jta-data-source>
<jta-data-source>gov/v3/jdbc/dataSource2</jta-data-source>
Please send your suggestion. Note: Application server is ...

3. Hibernate and Multi DataSource    coderanch.com

4. hibernate code and data source    coderanch.com

Hi Jason, you got me right partially. yes I created a datasource inside an application server. Meanwhile I have a standalone java code (it IS hibernate) that I do NOT want to deploy to the server. For example, I can write a simple table query and print-out code using hibernate but I do NOT deploy this code to the application server. ...

5. Hibernate and XA datasource    coderanch.com

Hi All, Currently in my project we are using Hibernate with plain Oracle Driver Manager as the database connection mechanism (oracle.jdbc.OracleDriver . Now we have been asked to use XA datasource which has to be configured in the app server. Though we have two database interaction in our application we don't have a cross transaction scenario. I believe using XA ...

6. JPA Where do I need to define the datasource?    coderanch.com

Hello, I have developed a simple JEE application to learn this new technology. I created a EAR file which contains a WAR file and a JAR file. The JAR file contains my JPA code. All works fine but at the moment I have transaction-type = "RESOURCE_LOCALE". In other words the connection is not managed by the application server. I now want ...

8. Application with different Datasource????    forum.hibernate.org

Hello together! how can I use a Application with hibernate and different Datasource???? e.g. Also test.hibernate.cfg.xml db_start.hibernate.cfg.xml replaced Code: .... protected static SessionFactory buildSessionFactory() { try { // Create the SessionFactory from hibernate.cfg.xml ...

9. Using existing DataSource    forum.hibernate.org

Hi all, I would like to integrate Hibernate with my existing code. I've a service that build DataSources (no matter if from JNDI or from connection properties). I would like to use this service to supply Connections for my SessionManager but also implementing my ConnectionProvider I cannot assign a reference to my DataSource service because the ConnectionProvider is directly and implicitly ...





10. Integrating existing Datasource in JPA    forum.hibernate.org

I would like to integrate JPA with my existing code. My requirment is like i would not specify jpa provider in my persistence.xml file. After deploying, the container will pick the default jpa provider. For example, if it is JBOSS, it will pick hibernate as default jpa provider, or if it is WebSphere then it will pick openjpa as default provider. ...

11. Does Infinispan always require XA-datasource?    forum.hibernate.org

I using Infinispan as a second level cache under Hibernate 3.3. Hibernate is configured to use JTA transactions in clustered Glassfish 2.1.1 enviroment. Isn't it possible to make Infinispan just hook on to already existent transactions using a regular data resource (ie non XA-resource). I get this exception when running a simple Hibernate Query: "Local transaction already has 1 non-XA Resource" ...

12. Configure DataSource-Basic Datasource Not Found    forum.hibernate.org

Newbie Joined: Wed Dec 08, 2010 8:56 am Posts: 3 pasha701 wrote: Doc for version Tomcat version 4.1. If you use later version, please check this link http://www.teradata.com/DownloadCenter/Topic9364-98-1.aspx Guess, this question more applied to Tomcat forum. To be specific I'm using jdk6_13 Tomcat-6.0.24 Oracle 10g Hibernate 3.2 My StackTrace in my customized html that calls web service is as follows is ...

13. Hibernate using a datasource without configuration file    forum.hibernate.org

Dear everybody: I would like to create a SessionFactory without any configuration file. That is, I would like to define the database class (it will be a MysqlDataSource) and its parameters in execution time. I have been searching a method "configure()" (in Configuration class) with a Properties object as a parameter, but I didn't found it. So i am very lost. ...

14. using hibernate to migrate data between datasources    forum.hibernate.org

Newbie Joined: Wed Apr 20, 2011 10:20 am Posts: 2 Hello, I am trying to use hibernate to migrate data between two databases. The approach I was thinking was basically to have a hbm.xml mapping file to map the source data to a POJO, within the context of a "source" database hibernate session, then use the same POJO to map to ...

15. Obtaining the datasource name from persistence.xml    forum.hibernate.org

Good morning guys, I'm working in a system that mostly uses JPA2 to work with persistence. but in some cases, we need to execute some gigantic select queries and map them to a DTO (not using any entity). the JPA way of doing it is to execute a nativeQuery and map the resultSet using @SqlResultSetMapping but this annotation is incredibly cumbersome. ...

16. Problems to found DataSource    forum.hibernate.org

Newbie Joined: Mon Oct 20, 2003 12:18 pm Posts: 12 Location: Mexico Hi, I have a SessionBean that extends of BaseService class. In this class I have a method to get the session factory Code: private SessionFactory getSessionFactory() { if (developmentMode) { ...





17. DataSource on WAS 5    forum.hibernate.org

and in the Websphere log file the following warning is generated... any ideas? thanks. Code: [1/19/04 17:53:57:391 GMT-03:00] 74552614 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl building session factory [1/19/04 17:53:57:422 GMT-03:00] 74552614 Dialect I net.sf.hibernate.dialect.Dialect Using dialect: net.sf.hibernate.dialect.OracleDialect [1/19/04 17:53:57:438 GMT-03:00] 74552614 NamingHelper I net.sf.hibernate.util.NamingHelper JNDI InitialContext properties:{} [1/19/04 17:53:57:547 GMT-03:00] 74552614 ConnectionFac I ...

18. DataSource - simple question    forum.hibernate.org

19. ehcache and two or more data sources    forum.hibernate.org

Hi All, I'm using hibernate 2.1.3 and ehcache as a simple read-only cache. I have several data sources - dev, test, prod - that have the same schema and mappings. I'm accessing all of them in my web app. From browsing the source code for the ehcache hibernate provider, it seems to me that ehcache can't work in this setup. I'm ...

20. Server configuration denies access to data source    forum.hibernate.org

Newbie Joined: Tue May 11, 2004 4:44 am Posts: 5 Hi, I've run into wierd problems trying to get hibernate to work on my linux machine. The mysql version i'm using is 4.0.18 and the mysql server is running on a network. Can anyone tell me what this message means ? Server configuration denies access to data source Here's my hiberbate.cfg.xml ...

21. DataSource Configuration    forum.hibernate.org

jboss.jca:service=RARDeployer com/kemaiev/jzudi/hibernate/CompanyHibernateImpl.hbm.xml ...

22. Server configuration denies access to datasource    forum.hibernate.org

Hibernate version: hibernate 2.1 Mapping documents: sample document follows here

23. Hibernate Datasource access issues    forum.hibernate.org

Hibernate version: 2.1.4 Mapping documents: iiop://localhost:2809/ com.ibm.websphere.naming.WsnInitialContextFactory jdbc/AX1 net.sf.hibernate.dialect.OracleDialect true true net.sf.hibernate.transaction.JTATransactionFactory java:comp/UserTransaction I get this error when initializing Hibernate Hibernate ExceptionCould not find datasource Exception in thread "P=824628:O=0:CT" ...

24. Hibernate ConnectionProvider vrs DataSource    forum.hibernate.org

[b]Hibernate version: 2.1[/b] I am currently looking at integrating Hibernate into an application that already exists. This application already has its own Connection Pool (that I wrote many years ago :) ). I am now trying to get Hibernate to use MY ConnectionPool. This is actually quite easy, although I found 2 ways (both of which seem to work): 1) Implement ...

25. Datasource configuration with hibernate    forum.hibernate.org

26. Datasource configuration with hibernate    forum.hibernate.org

27. Obtaining Hibernate's Datasource    forum.hibernate.org

28. Datasource creation and Configuration    forum.hibernate.org

I am using Hibernate 3.0 and WebLogic 8.1 as the server. I want to create the datasource for my database.I want to connect to the database through datasource. What is the procedure to do that..? How to create the datasource ..? What are the files to be configured..?(like .. hibernate.cfg.xml...etc) help me with a sample example .

29. Hibernate+WAS datasource;ANYONE been able to make this work?    forum.hibernate.org

Newbie Joined: Tue Jun 07, 2005 4:39 pm Posts: 10 I have a J2EE application using Hibernate running on WAS 5.1.1.4 with MS SQLServer as the database. It works fine with jdbcUrl connection properties but I can't seem to get it working with a datasource. I've spent a week on this to no avail. I'm using a JDBC Provider for SQLServer ...

30. Datasource is not bound    forum.hibernate.org

Your code tag is not the right one. Why do you say it is like an infinite loop ? Does your app terminate ? If not where does it hang ? If your app terminate, did you activate the sql trace to see that nothing happen ? If it so, try to activate all hibernate debug log and post it

31. How to define two datasource for any application    forum.hibernate.org

Hi Friends, If I want to use two database in my application for e.g mySQL and MS-SQL Server then how can I define two datasource in the xml file.Do I have to make two hibernate.cfg.xml files or single file would be fine.If single file then how can I write both datasource in that file.I dont have any idea about this.Please let ...

32. Mix use of TableGenerator with DataSource?    forum.hibernate.org

Hi All, I'm aware of the restriction that the table-based id generators (such as HiLoGenerator) cannot be used with application server data sources, and the reasons for this. However, from working on other projects in the past, my expectation is that the table-based generators will be the most efficient id generators (does anyone have statistics to back-up my assertion?). I would ...

33. unicode support with datasource    forum.hibernate.org

I use latest version of hibernate/mysql/tomcat/mysql connector and try to put some unicode characters to/from database through jsp pages. I have configured hibernate to establish connection to database (without datasource, ie all connection parameters are defined in hibernate configuration file) and was able to successfully save/read unicode characters to/from database (even though it took me a very long time to put ...

34. Using an existing datasource    forum.hibernate.org

Hi All, currently I'm writing an app using Hibernate 3 against an existing Oracle 10g database. I'm new to Hibernate and databases in general having spent most of my time writing Swing apps and so I'm wondering how I would model this SQL query. Am I going along the right lines of creating a POJO for each table in the query? ...

35. how can i configure datasource in hibernate    forum.hibernate.org

36. Hibernate with different data sources..    forum.hibernate.org

Hi In Hibernate 3.0, i have to use different data sources for oracle database(different IPaddress,Username,password) in an application. I mean, we use oracle database in different servers for different queries. Some times i have to connect to the server xyz for query1 and connect to the server ABC for query2 with different username,password and server DEF for query3. I know hibernate ...

37. Jetty6 datasource lookup from hibernate not working    forum.hibernate.org

I'm using jetty6, and the latest version of Hibernate. I have this in my hibernate.cfg.xml: java:comp/env/jdbc/mysqlds org.hibernate.dialect.MySQLDialect thread org.hibernate.cache.NoCacheProvider true And this in my etc/jetty.xml: jdbc/mysqlds jdbc:mysql://localhost/lendingcrowd com.mysql.jdbc.Driver username xxxxxx 10 true java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at ...

38. Do i need to change my code if i use a datasource?    forum.hibernate.org

Hi there, i configured my datasource properly in TOMCAT and here is my hibernate.cfg.xml file: java:comp/env/jdbc/inouk org.hibernate.dialect.MySQLDialect 10 1 180 10 ...

39. Specifying data source    forum.hibernate.org

Hi I am facing a very small problem , but which already ate lots of my time , so here it goes, I want to specify data source name in hibernate.cfg.xml I came across following four version, but none of them is working, java:/comp/env/jdbc/dsname In following "/" before comp is removed java:comp/env/jdbc/dsname Property name has been changed java:/comp/env/jdbc/dsname ...

40. Specifying data source    forum.hibernate.org

Hi I am facing a very small problem , but which already ate lots of my time , so here it goes, I want to specify data source name in hibernate.cfg.xml I came across following four version, but none of them is working, java:/comp/env/jdbc/dsname In following "/" before comp is removed java:comp/env/jdbc/dsname Property name has been changed java:/comp/env/jdbc/dsname ...

41. Specifying data source    forum.hibernate.org

Hi I am facing a very small problem , but which already ate lots of my time , so here it goes, I want to specify data source name in hibernate.cfg.xml I came across following four version, but none of them is working, java:/comp/env/jdbc/dsname In following "/" before comp is removed java:comp/env/jdbc/dsname Property name has been changed java:/comp/env/jdbc/dsname ...

42. using more than one data source    forum.hibernate.org

Hi Mike, Currently my project required me to retrieve data from one database, and manipulate(insert, delete, update) data to another database. How can i define 2 data source in hibernate.cfg.xml file? or any ways to do it? com.microsoft.jdbc.sqlserver.SQLServerDriver jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=EVENTS sa password 10 true org.hibernate.dialect.SQLServerDialect org.hibernate.transaction.JDBCTransactionFactory org.hibernate.cache.HashtableCacheProvider ...

43. Cannot get hibernate working with datasource! Please help    forum.hibernate.org

Newbie Joined: Wed Dec 13, 2006 4:32 pm Posts: 1 I am new to hibernate and i kind of got the application working with a local MS Access database but couldn't get it working with a remote MSSQL server. I have created a datasource with name EOL2 and with a JNDI name EOL2Datasource I am working on Rational Application Developer (RAD) ...

44. Hibernate using 2 datasources.    forum.hibernate.org

Hi to all, I'm new to Hibernate and got stuck with a quite advanced problem. The application needs to get it's data from 2 datasources. One datasource that hold data of the users (users), and one that holds data specific for the application (items). Now the problem is that there is an object that holds an instance of both: Code:

45. Passing DataSource to Configuration directly?    forum.hibernate.org

Read a little further. The built in connection pool is not intended for production use, but hibernate integrates with several connection pools that are. The usage of C3PO is documented right below the stuff on the hibernate connection pool If you use one of these pools rather than hibernate's built in one then hibernate can be used stand alone without having ...

46. Two datasources    forum.hibernate.org

47. Two datasource, two aplications one problem    forum.hibernate.org

Newbie Joined: Sat Jul 22, 2006 3:08 pm Posts: 6 I have on line store administration application written in JSF with hibernate and MySQL database. It all works on Tomcat 5.5. I lately moved from Windows platform to Linux Fedora. It's still working but I have a problem that I can't figure out on my own. hibernate.datasource problem. I always have ...

48. DriverMAnager vs. Datasource    forum.hibernate.org

49. 20 over datasource. is it problem?    forum.hibernate.org

It's fine to do that but you with need to configure 20 session factories, one for each db, and write some code of your own to make sure that te right one is used for each user session. I've done this myself before for 8 databases. It worked ok but the problem comes when you want to start using a second ...

50. Opinion: Hibernate and Datasource    forum.hibernate.org