[jboss-user] [Persistence] - Re: how to create PersistenceUnit and map to dataSource prog

2009-11-23 Thread getaceres
Unfortunately, you cannot use a JTA datasource unless you get the entity managers by injection, so you cannot use the jta-data-source element and you have to set the javax.persistence.nonJtaDataSource property in the map. Also, if you are using EJBs, you have to add the

[jboss-user] [Persistence] - Re: how to create PersistenceUnit and map to dataSource prog

2009-11-20 Thread getaceres
I have the same problem as you. I need to use different databases with the same tables in the same application (the difference is that for me is that redeploying or even restarting JBoss is permitted, but in this case, it doesn't matter). The idea is to use the same persistence unit changing

[jboss-user] [Persistence] - Re: how to create PersistenceUnit and map to dataSource prog

2009-11-19 Thread getaceres
The only solution that I've found is to create the Entity Managers (and factories) through the Persistence.createEntityManagerFactory method passing it a Map with the JNDI direction of the new datasource. You can also pass the datasource connection information by hibernate properties in the

[jboss-user] [Persistence] - Getting persistence units programatically for JTA

2009-11-19 Thread getaceres
Hello, I'm developing an application and I have to use the same JPA beans in multiple databases in the same application. The solution that I've thought is to create various persistence units, one for every database and use them in my beans. The problem of this approach is that I cannot use the

[jboss-user] [Installation, Configuration DEPLOYMENT] - Re: Problem with EAR deployment in JBoss 5.1.0CR1

2009-05-12 Thread getaceres
Well, so, Is there a way to force a specific deployment order for the jars appart from renaming them? In JBoss 4 there was an option in jboss.xml but it seems to be deprecated. If not, is there a way to specify dependencies among EJBs so JBoss 5 deploys them in the correct order? View the

[jboss-user] [Installation, Configuration DEPLOYMENT] - Re: Problem with EAR deployment in JBoss 5.1.0CR1

2009-05-12 Thread getaceres
I've renamed the jars and now it looks like this: | ?xml version=1.0 encoding=UTF-8? | application xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee

[jboss-user] [Installation, Configuration DEPLOYMENT] - Problem with EAR deployment in JBoss 5.1.0CR1

2009-05-11 Thread getaceres
I'm using JBoss 5.1.0CR1 and I'm trying to deploy an EAR file which contains the following: ?xml version=1.0 encoding=UTF-8? | application xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee

[jboss-user] [JBossWS] - Re: Jar file for org.jboss.ws.core.soap.SAAJMetaFactoryImpl.

2009-05-08 Thread getaceres
I'm having the same issue with JBossWS Metro 3.1.1 over a new installed JBoss 4.2.3. I deploy the Metro stack and then I try to deploy my EJB3 services (each one in a different jar). The first one gives this exception: | 11:21:42,907 ERROR [MainDeployer] Could not start deployment:

[jboss-user] [JBossWS] - Re: java.lang.ClassCastException: org.jboss.ws.core.jaxws.sp

2009-03-11 Thread getaceres
I have the same problem. I've upgraded to JBossWS 3.1 and my Web Service clients executing in JBoss are throwing this exception. I'm going back to 3.0.5 until this is fixed. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4216875#4216875 Reply to the post :

[jboss-user] [JBossWS] - Optimizing deployment

2009-02-13 Thread getaceres
Hello, I'm developing a set of web services which accept and return data based on a standard. I have the standard schema and I have generated the JAXB elements jar file. Now, I have some web services (like 6 and it's growing) and they all use the same jar file with the bindings. They are EJB3

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - BLOB handling with Postgresql

2008-12-28 Thread getaceres
Hello, I'm developing an application using JBoss 4.2.3. I have to store some XML documents in a database and I have to read, and update them. These documents will be encrypted eventually so I have defined an entity like this: @Entity public abstract class Document implements Serializable { @Id

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Recomended approach for using JPA and JDBC together?

2008-12-28 Thread getaceres
I'm using the first approach since it's more portable. I'm using in in an EJB3 so the transaction is automatically managed and the connection is really referring to the same database. I don't know I will have problems in the future, but right now I'm looking for portability and upgradability.

[jboss-user] [JBossWS] - Re: jboss.xml wsdl-override works with one JBoss version, bu

2008-12-18 Thread getaceres
Hello, I'm trying to deploy some EJB3 Web Services and I want them to use HTTP Basic Authentication. I tried first using the jboss.xml file but it was ignored, then I tried with @WebContext annotation and it worked, so now seeing your comment, I think that there must be a bug that makes

[jboss-user] [JBossWS] - Re: Enabling HTTP Basic Authentication for EJB3 web service

2008-12-17 Thread getaceres
I've seen that using @WebContext works and my service uses HTTP Basic Authentication but this breaks portability. I tried using the jboss.xml file to get the same result but it seems as if it were ignored. Is there any example of using the jboss.xml file to achieve that? View the original post

[jboss-user] [JBossWS] - Enabling HTTP Basic Authentication for EJB3 web service

2008-12-15 Thread getaceres
Hello, I have some EJB3 web services in a jar and I want to use HTTP Basic Authentication + HTTPS to access them. I've looked at the documentation and I've found ways to do it by using custom JBoss annotations like @SecurityDomain and @WebContext, but as I want my application to be portable, I

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Forcing bytea for Blobs in Postresql

2008-12-10 Thread getaceres
I've done that, this is my code: | @Lob | protected byte[] content; | However, for that field Toplink assumes that the underlying type is bytea, while Hibernate assumes that it is oid. So basically, every one of them is defaulting to a different way to store a Blob of the two allowed

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Forcing bytea for Blobs in Postresql

2008-12-10 Thread getaceres
Hello, I'm writing a JEE application and I'm planning to support Glassfish and JBoss in their default configurations, so I need to support Toplink and Hibernate. I know that I can use Hibernate with Glassfish but I'd like my code to work in more than one JPA implementation, so using Hibernate

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Forcing bytea for Blobs in Postresql

2008-12-10 Thread getaceres
It's not so easy, I think. That would make the validation to succeed but reading a bytea or reading an oid is completely different. When using oid, the blob is saved in another table, so reading it will involve reading in streaming from a table. It's a completely different system. As I'm using