[jboss-user] [JBoss Seam] - Re: Multiple Datasources

2007-09-25 Thread baz
Hello,
multiple Datasources works, but only with specific databases.
I think that this is a question that belongs in a forum corresponding to the 
container you use.
Datasources are configured in a container(Tomxcat Jboss glassfish..)
But see here..
  http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113622
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113633

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088681#4088681

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088681
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple datasources?

2007-04-12 Thread baz
marcosH
would you be so kind to share your solution with me?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036942#4036942

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036942
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple datasources?

2007-04-12 Thread baz
marcosH
would you be so kind to share your solution with me?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036940#4036940

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036940
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple datasources?

2007-04-12 Thread baz
Sorry, tried again.
I have followed the advise, but still having the problem in the first post.
My entities are bound to both datasources. 
I do not have a clue what i have missed:-(

anonymous wrote : bind my entities using the @PersistenceUnits annotation
Perhaps this is the key. But in which way i must anotate my entities?
Ciao,
Carsten

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036779#4036779

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036779
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple datasources?

2007-04-12 Thread baz
I have followed the advise, but still having the problem in the first post.
My entities are bound to both datasources. 
I do not have a clue what i have missed:-(

[qoute]bind my entities using the @PersistenceUnits annotation

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036778#4036778

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036778
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple datasources?

2007-04-04 Thread marcosH
Ok!! 

Thanks for the reply, it works fine!!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034790#4034790

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034790
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple datasources?

2007-04-04 Thread c_eric_ray
datasource...

  | 
  |   
  |   
  | PostgresDS1
  | jdbc:postgresql://localhost:5432/db1
  | org.postgresql.Driver
  | db1
  | db1
  | 35
  | 6
  |  
  |  PostgreSQL 8.0
  |  
  |   
  | 
  |   
  | PostgresDS2
  | jdbc:postgresql://localhost:5432/db2
  | org.postgresql.Driver
  | db2
  | db2
  | 35
  | 6
  |  
  |  PostgreSQL 8.0
  |  
  |   
  | 
  | 
  | 


persistence.xml...

  | http://java.sun.com/xml/ns/persistence"; 
  | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
  | xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
  | http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";>
  | 
  |   
  | org.hibernate.ejb.HibernatePersistence
  | java:/PostgresDS1
  | 
  |   
  |   
  |   
  |   
  |   
  | 
  |   
  | 
  |   
  | org.hibernate.ejb.HibernatePersistence
  | java:/PostgresDS2
  | 
  |   
  |   
  |   
  |   
  |   
  | 
  |   
  | 
  | 

Source code...

  |   @PersistenceContext(unitName="db1-PU")
  |   private EntityManager db1EntityManager;
  | 
  |   @PersistenceContext(unitName="db2-PU")
  |   private EntityManager db2EntityManager;
  | 

Notice the  value in the persistence.xml matches the 
 in the datasource. Then the source code annotates two different 
instances of an EntityManager with the appropriate PersistenceContext

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034669#4034669

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034669
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user