Re: Strange email from WebTide.

2009-01-21 Thread Dain Sundstrom
Juan, I'm investigating working on OpenEJB full time, and asked my friend Adam if he could help me assess the feasibility of building a Webtide like organization for the OpenEJB project. If you have a few minutes to respond (offline), I would really appreciate it. Thank you, -dain On

Re: Catching OpenJPA validation exceptions in OpenEJB

2008-12-29 Thread Dain Sundstrom
On Dec 28, 2008, at 8:28 PM, David Blevins wrote: On Dec 23, 2008, at 8:06 AM, Luis Fernando Planella Gonzalez wrote: Hi all! I'm using OpenEJB 3.1 under Tomcat. When I try to persist an invalid entity, say, with a field annotated with @Basic(optional=false) with a null value, all I get i

Re: Stateful removal

2008-12-08 Thread Dain Sundstrom
I checked the code and we don't close the EntityManager when the stateful bean is removed. Do you know if this is a spec defined behavior or something that JBoss just does? Also, if this code is called from within a JTA transaction, I wouldn't expect the EntityManager to be closed until th

Re: web.xml with SYSTEM ENTITY (in DTD) provoques NPE in OPENEJB loading

2008-12-04 Thread Dain Sundstrom
On Dec 4, 2008, at 1:29 AM, Maxime Thieu wrote: Yes, this configuration works well in standalone Tomcat. The file.xml is situated in WEB-INF folder (where web.xml is situated) and contains some servlet definitions. The fact is that OpenEJB parser does not read system entities whereas Tomc

Re: inject ejb into webservice

2008-12-03 Thread Dain Sundstrom
On Wed, Dec 3, 2008 at 1:23 PM, Dain Sundstrom <[EMAIL PROTECTED]> wrote: Hum, the WebServiceContainer is automatically setup when embedded into Tomcat... My guess is there is another exception printed in the OpenEJB log file which is causing the WebServiceContainer to not be set.

Re: Lookup of EntityManager from JNDI

2008-12-03 Thread Dain Sundstrom
On Dec 2, 2008, at 7:35 AM, Martin Vysny wrote: Hi guys, is it possible to lookup EntityManager from JNDI? Not right now. It is David and I have been talking about doing (for non-related issues). I cannot use the @PersistentContext injection because we are using run-time-generated (no

Re: inject ejb into webservice

2008-12-03 Thread Dain Sundstrom
Hum, the WebServiceContainer is automatically setup when embedded into Tomcat... My guess is there is another exception printed in the OpenEJB log file which is causing the WebServiceContainer to not be set. I never tried @EJB injection into a POJO webservice, but it should work. Can y

Re: web.xml with SYSTEM ENTITY (in DTD) provoques NPE in OPENEJB loading

2008-12-03 Thread Dain Sundstrom
Is this something that works in standalone Tomcat? If it is, where is the "file.xml" file located? This is not likely to be fixed in the next release, so in the mean time, you'll have to unroll the entity reference by hand (or using some tool). -dain On Nov 28, 2008, at 7:53 AM, Maxime T

Re: JMS ConnectionFactory

2008-12-03 Thread Dain Sundstrom
16"); InitialContext context = new InitialContext(properties); ConnectionFactory cf = (ConnectionFactory) context.lookup("ConnectionFactory"); Hope that helps, Jon Oliver Günther wrote: And how do I get the connectionFactory on the Remote Client ? Dain Sundstrom wrote:

Re: getCallerPrincipal in @PostConstruct

2008-12-03 Thread Dain Sundstrom
I'm not very familiar with the Geronimo/OpenEJB security integration, but I'll answer what I can. On Nov 25, 2008, at 4:31 PM, Kory Markevich wrote: I'm trying to call getCallerPrincipal in a method annotated with PostConstruct on a stateful session bean. I'm using whatever version of Ope

Re: How to use annotation in client application?

2008-11-25 Thread Dain Sundstrom
On Nov 24, 2008, at 11:51 PM, Manu George wrote: Hi Dain, Good to know that. I was not aware that a Java EE App Client container existed. Is there any docs on this? I couldn't find any docs. If not maybe we should create some. If you have time, that would be great. David wrote the bulk o

Re: EJB with JPA odd problem.

2008-11-24 Thread Dain Sundstrom
On Nov 21, 2008, at 8:26 AM, ericp56 wrote: I don't know why it can't find the table. It's not in my logon schema, but I have specified it in my persistence.xml file. I've tried specifying the table in the persistence.xml properties (now I'm just specifying the schemas, and that's recogni

Re: JMS ConnectionFactory

2008-11-24 Thread Dain Sundstrom
Create a field like this in your EJB (or Servlet in Tomcat embedded mode). @Resource ConnectionFactory connectionFactory; IIRC the JNDI name of the connectionFactory is logged during setup, but I suggest you use injection instead of JNDI as it is way more portable. -dain On Nov 20, 2008

Re: OpenEJB issue with Oracle Driver

2008-11-24 Thread Dain Sundstrom
I think the key may be that your code is missing: p.put("movieDatabase", "new://Resource?type=DataSource"); Regardless, did you get the example working before modifying? This example seems to be almost exactly what you are doing. I'd start with the example and then change the driver and ur

Re: How to use annotation in client application?

2008-11-24 Thread Dain Sundstrom
OpenEJB does have a client container, but I fully remember how it works. You need to deploy an app-client as part of your ear. IIRC when it deploys, the container will print the module id for the app- client. Then you run a command like this: java -Dopenejb.client.moduleId=ID_FROM_CONTAIN

Re: Get current SessionContext

2008-11-24 Thread Dain Sundstrom
On Nov 21, 2008, at 7:27 AM, Martin Vysny wrote: On Thu, 2008-11-20 at 18:17 +0100, Martin Vysny wrote: Hi guys, perhaps a strange question: is there an OpenEJB-specific way to detect if my code is currently being executed in a stateless session bean context (and get its SessionContext)? In

Re: Problem with exceptions thrown by stateful session beans ?

2008-11-24 Thread Dain Sundstrom
BTW this annotation is only required on exceptions that extend java.lang.RuntimeException. Normal checked exceptions are considered ApplicationExceptions by default. -dain On Nov 21, 2008, at 6:57 AM, Olivier THIERRY wrote: That's clear to me now. I added @javax.ejb.ApplicationException

Re: OpenEJB issue with Oracle Driver

2008-11-24 Thread Dain Sundstrom
If you are using the movie example, you'll need to configure the movieDatabase pool and not the SchedulerDB pool. You'll need something like this: p.put("movieDatabase", "new://Resource?type=DataSource"); p.put("movieDatabase.JdbcDriver", "oracle.jdbc.OracleDriver"); p.put("movieDatabase.Jdb

Re: OpenEJB security in Tomcat

2008-11-24 Thread Dain Sundstrom
IIRC, the openejb application is only accessible from localhost. If you would like to setup security, simply edit the web.xml in the openejb application, and add a servlet security constraint. After that, follow the Tomcat security documentation on how to setup a authorization (username a

Re: How to maintain a schema per user?

2008-11-10 Thread Dain Sundstrom
Assuming you are using straight JDBC or a persistence framework designed for per-user connections, I believe that the org.apache.commons.dbcp.datasources.PerUserPoolDataSource pool can do what you want, but I've never used per-user pools myself. Also, I bet that c3p0 (http://sourceforge.ne

Re: Unknown error in Assembler for MessageDriven bean

2008-10-02 Thread Dain Sundstrom
Can you post the code for you message driven bean or at the very least the class declaration with any extends clause, implements clause and class annotations? My guess is the MDB class is not-spec-compliant and Weblogic has some special logic to guess the proper message listener interface.

Re: @LocalBinding with openejb

2008-09-06 Thread Dain Sundstrom
We could add something for that. Can you explain exactly how the annotation is supposed to work? Are there other similar annotations for stuff like remote interfaces? Also, if you have time, can you add a "New Feature" jira issue (http://issues.apache.org/jira/browse/OPENEJB ). -dain On

Re: Cannot get openejb to start

2008-09-04 Thread Dain Sundstrom
On Sep 3, 2008, at 3:31 PM, wcteskey wrote: I even uninstalled and re-installed tomcat6.0.18 and made sure that I could run the catalina.bat and start and stop the server. I followed the instructions on http://openejb.apache.org/new-instructions.html and when the javaagent tries to run (I ass

Re: Custom JAAS LoginModule: Principal with empty name provided

2008-09-04 Thread Dain Sundstrom
IIRC, OpenEJB performs a single "fake" login after installing the security service in an effort to cause the login module to initialize early. The security service performs this in a try catch that ignores any exceptions. -dain On Sep 3, 2008, at 6:46 AM, Martin Vysny wrote: Hello guys,

Re: Using the Timer Service (in Geronimo)

2008-08-30 Thread Dain Sundstrom
On Aug 29, 2008, at 4:43 PM, Jay D. McHugh wrote: Dain, Looks like getting rid of all of my global level variable and nulling them out once I was done with them allowed enough objects to be garbage collected. As an extra (and perhaps unneccessary) step, I removed all of the injected EJBs an

Re: Using the Timer Service (in Geronimo)

2008-08-29 Thread Dain Sundstrom
On Aug 28, 2008, at 10:13 PM, Jay D. McHugh wrote: Hello all, I have a chain of stateless session beans that are being triggered by the timer service in Geronimo. But, even though they are being created with single expirations - they do not seem to be getting destroyed until the entire chain f

Re: Custom Resource Factory

2008-08-23 Thread Dain Sundstrom
On Aug 22, 2008, at 4:30 PM, Dain Sundstrom wrote: On Aug 20, 2008, at 6:47 PM, David Blevins wrote: When webbaps boot, we export all the Tomcat configured resources as OpenEJB objects so they are available for injection. What we don't do is log a message when we do that which wou

Re: Custom Resource Factory

2008-08-22 Thread Dain Sundstrom
On Aug 20, 2008, at 6:47 PM, David Blevins wrote: When webbaps boot, we export all the Tomcat configured resources as OpenEJB objects so they are available for injection. What we don't do is log a message when we do that which would be really handy right now at least I don't think we

Re: Inbound JCA 1.5 Resource Adapter example

2008-08-13 Thread Dain Sundstrom
On Aug 13, 2008, at 12:17 AM, Neighbour wrote: Hi all, I'm looking for the example of Inbound JCA Resource Adapter compliant to JCA 1.5 spec. So it would be possible to deploy it into OpenEJB. Yes OpenEJB supports JCA 1.5. If you include a rar file in an ear we will automatically deploy

Re: Configure OpenEJB Container to use external activemq.xml file

2008-08-12 Thread Dain Sundstrom
On Aug 12, 2008, at 6:43 AM, rde8026 wrote: Hi Dain, Looks like you got it! Thanks so much for the effort. When should we expect this in a final release? Yes. It is already checked into trunk. -dain

Re: Configure OpenEJB Container to use external activemq.xml file

2008-08-12 Thread Dain Sundstrom
I think I have fixed this. We modify the brokerURL to handle the persistence setup, but we don't need to perform these modifications when using an external activemq.xml file. So, I simply wrapped this code with an if brokerUrl.startsWith("broker:"). The fix is checked into trunk, and I u

Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-06 Thread Dain Sundstrom
I believe this this the JIRA for the issue: https://jira.jboss.org/jira/browse/EJBTHREE-440 It appears that Hibernate requires a custom ObjectInputStream to work properly. They claim the root cause is this VM bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142 It seems

Re: WebServices too long result

2008-08-06 Thread Dain Sundstrom
Karan, I'd guess that this is the chunking issue again. Chunks are typically 4k so you will only see problems from large results. -dain On Aug 6, 2008, at 7:20 AM, Karan Malhi wrote: Not sure, but looks like the connection on the client is closing earlier than required. It would be nice

Re: Problem with openjpa enhancer - using runtime enhancement

2008-07-17 Thread Dain Sundstrom
I'm pretty sure this is the problem, and it is pretty common. The problem is the persistence units are not processed until OpenEJB starts and that is typically after the test class has loaded. The persistence classes reference by the test class are loaded when the test class is loaded, wh

Re: PersistenceContext and Hibernate session

2008-07-15 Thread Dain Sundstrom
On Jul 15, 2008, at 2:32 PM, David Blevins wrote: On Jul 15, 2008, at 6:11 AM, chawax wrote: I finally could make it work with JBoss AS ... but it doesn't work the same as Open EJB ! On JBoss AS the getDelegate method returns Hibernate session, while it returns Hibernate entity manager

Re: PersistenceContext and Hibernate session

2008-07-11 Thread Dain Sundstrom
JtaEntityManager is a wrapper around the raw EntityManager instance we get from the JPA provider. JtaEntityManager performs the task required by the EJB spec such as committing the flushing the JPA data at the end of the transaction and assuring that all access to the same persistence unit

Re: Antwort: Re: Antwort: Re: Antwort: Re: Using OpenEJB Security for JAAS LoginModule

2008-06-30 Thread Dain Sundstrom
On Jun 30, 2008, at 7:32 AM, [EMAIL PROTECTED] wrote: Hi David, Germany lost the Euro2008 therefore I need good news ;-) Do you have any for me? I confinced my team to use all junit-Tests with openejb as embedded container in Eclipse :-) Using my tests, sometimes strange things happen: * I

Re: @ApplicationException(rollback=true) ignored from external API

2008-06-30 Thread Dain Sundstrom
On Jun 25, 2008, at 2:15 PM, David Blevins wrote: Is the annotated exception class listed in any of the throws clauses of the business interface methods in module B? (where module A has the exception class, module B does not) If so, we could expand our support to looking there too in addit

Re: AW: Store data in SessionContext

2008-06-19 Thread Dain Sundstrom
Karsten, Gilbert makes a good point here, but I don't agree with all of it When using a static field in a enterprise application (e.g., EJB, servlets, web-services, enterprise spring), you should be aware that the static field will be private to each running instance of the application

Re: AW: Store data in SessionContext

2008-06-18 Thread Dain Sundstrom
On Jun 18, 2008, at 1:19 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED] > wrote: Are static fields also allowed in interceptors like I want to do it? According to the spec they are not allowed, but it is an unenforceable and in my opinion a stupid restriction. To my knowledge no vendor actually

Re: AW: Store data in SessionContext

2008-06-17 Thread Dain Sundstrom
On Jun 17, 2008, at 6:15 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED] > wrote: Hi David, hi Dain, I have tried to use the javax.interceptor.InvocationContext.getContextData() approach. Unfortunately it did not works, because The InvocationContext differs for me. I have two Interceptor, one

Re: DataSource configuration for production

2008-06-16 Thread Dain Sundstrom
I think I have finally fixed this issue. Can you retest and let me know if it is working for you? Thanks, -dain On Jun 16, 2008, at 10:56 AM, Dain Sundstrom wrote: On Jun 13, 2008, at 8:43 AM, jfjames wrote: My intention was to find an alternative to DBCP ready to be used in production

Re: Store data in SessionContext

2008-06-16 Thread Dain Sundstrom
On Jun 13, 2008, at 1:12 PM, Karsten Ohme wrote: Hi, Maybe a very simple question, but I haven't found a solution: Is it possible to store any data in the SessionContext of a Session Bean? Unfortunately, no. The session context is a read only object. I have a stateless bean which execute

Re: DataSource configuration for production

2008-06-16 Thread Dain Sundstrom
On Jun 13, 2008, at 8:43 AM, jfjames wrote: My intention was to find an alternative to DBCP ready to be used in production with OpenEJB. Since it doesn't exist, I have to change my mind. If you agree to commit our patch quickly, I'm OK to use DBCP in production. Quick status update. I sta

Re: DataSource configuration for production

2008-06-12 Thread Dain Sundstrom
If you do get c3p0 (or any other pool) working, can provide the configuration so we can add it to the documentation? One other possibility is atomikos (http://www.atomikos.com/Main/AtomikosCommunity ). It is a full JTA implementation, so it will be a bit more work to integrate. -dain On

Re: DataSource configuration for production

2008-06-12 Thread Dain Sundstrom
I'll commit it later today. -dain On Jun 12, 2008, at 2:32 AM, jfjames wrote: OK, we've opened a DBCP JIRA issue : https://issues.apache.org/jira/browse/DBCP-269. It would be very nice to include this patch in OpenEJB 3.0.1. -JF David Blevins wrote: On Jun 11, 2008, at 4:44 AM, jfjames

Re: Antwort: Re: Antwort: Re: Re: maven build of openEJB3 [Virus checked]

2008-06-11 Thread Dain Sundstrom
This would only be needed if the build fails (and it is only for the maven process). The problem is we generate and compile a large number of classes, and the plugin is using javac which isn't very efficient memory wise. When I get a chance, I'll update the plugin to optionally support th

Re: OpenEJB.war outside webapps

2008-06-10 Thread Dain Sundstrom
The exception is caused when the listener fails to find the openejb.war file. I think the code is only scanning the webapps directory, but there may even be a bug in that for Tomcat 6. In the mean time, I added a System property "openejb.war" which we will use to locate the openejb.war fil

Re: Antwort: Re: Antwort: Re: Re: maven build of openEJB3 [Virus checked]

2008-06-10 Thread Dain Sundstrom
http://www.atosworldline.com Geschäftsführer: Erik Munk Koefoed Aufsichtsratsvorsitzender: Didier Dhennin Sitz der Gesellschaft: Frankfurt/Main Handelsregister: Frankfurt/Main HRB 40 417 Dain Sundstrom <[EMAIL PROTECTED]>

Re: Antwort: Re: Re: maven build of openEJB3 [Virus checked]

2008-06-09 Thread Dain Sundstrom
I wrote the plugin. Do you have a stack trace (use -e or -X to generate)? That will help me narrow down the problem. Thanks, -dain On Jun 9, 2008, at 6:16 AM, [EMAIL PROTECTED] wrote: That was a quick answer ! Thanks ! I think you 're right: it is a problem with spaces, and the solution

Re: OpenEJB.war outside webapps

2008-06-09 Thread Dain Sundstrom
Sorry for the late reply. I sent one earlier, but my mail client locked-up internally and decided to stop sending mail :( On Jun 6, 2008, at 3:09 AM, uglything wrote: I still have a problem when I explicitely set a new context in the server.xml... OpenEJB loads first, but when MyWebApp load

Re: OpenEJB.war outside webapps

2008-06-05 Thread Dain Sundstrom
On Jun 5, 2008, at 2:52 AM, uglything wrote: Nothing complex... But Tomcat tries to load MyWebApp before openejb, as expected from the specifications... Hence the deployment fails. Well, to address that, I tried to add explicitely the openejb context before MyWebApp :

Re: maven build of openEJB3 [Virus checked]

2008-06-05 Thread Dain Sundstrom
I think I fixed this earlier today. I forgot to add declare the plugin repository for this SXC plugin. Anyway, if you svn update your source code, it would build now. -dain On Jun 5, 2008, at 8:24 AM, [EMAIL PROTECTED] wrote: Hi guys, I am pretty new to openEJB3, so please bare with me,

Re: loadbalancing & failover of stateless beans

2008-06-04 Thread Dain Sundstrom
Youcef, I'd like to reiterate one of David's points. If you already have a web load balancer in production, you can get load balancing today for free by simply using our ejb over http protocol. This has a big advantage for your operations staff as they would only have one load balancing

Re: CMP Example with field mapping file

2008-05-14 Thread Dain Sundstrom
I can't seem to find any good examples of this which is strange since it is a very common situation. Try adding this to your file (after the last cmp-field-mapping): http://www.openejb.org/xml/ns/ pkgen-2.1"> As I mentioned in another email, the actual con

Re: Enhancer annoyance

2008-05-13 Thread Dain Sundstrom
If you switch to Java6 OpenJPA will use the dynamic class rewriting stuff in the Java6 vm when enhancing. It also doesn't need the javaagent arg, since in Java6 you can late start the agent. -dain On May 13, 2008, at 11:23 AM, JimOR wrote: I'm running into a mild annoyance running a juni

Re: CMP Example with field mapping file

2008-05-13 Thread Dain Sundstrom
Looking at the conversion code, we currently detect if the field has a pkgen strategy associated, and if so we set @GeneratedValue(strategy=IDENTITY) on the field. The code has a nice todo on it to add support for other JPA generation strategies, so if IDENTITY isn't what you want we shou

Re: Store the encrypted passwords in openejb.xml

2008-04-25 Thread Dain Sundstrom
Does anyone know how other app servers handle this? -dain On Apr 24, 2008, at 4:37 AM, sujith k wrote: Hi, In my openejb.xml I am storing the user name and password for the database connection in plain text. Is there any way to store the passwords in encrypted format in openejb.xml? The

Re: BMP with OpenEJB standalone + Tomcat 6

2008-04-22 Thread Dain Sundstrom
Alexander is not subscribed to this list so I'm CCing him directly. -dain On Apr 22, 2008, at 11:11 AM, David Blevins wrote: On Apr 22, 2008, at 4:49 AM, Alexander von Hedenström wrote: Hi! I'm trying to build and deploy a small entity bean with OpenEJB. Now there is some trouble receiving

Re: Best practice for cascading persist of existing entity records

2008-04-22 Thread Dain Sundstrom
re at the beginning makes a lot of sense. Now I just need some way to make sure that new entities that reference data already in the datastore are correctly wired. I'm wondering if there are examples of this sort of thing? Cheers, -- Alex On Mon, Apr 21, 2008 at 12:21 PM, Dain Sund

Re: Best practice for cascading persist of existing entity records

2008-04-21 Thread Dain Sundstrom
I'm not sure I fully understand what you are running into, but I'll take a stab at it. Normally, I suggest people avoid storing unit tables in the db, but in your specific case, I know you are have a persistence model for a truly generic system. BUT, for anyone else reading this email in t

Re: How to handle EntityExistExceptions

2008-04-16 Thread Dain Sundstrom
On Apr 16, 2008, at 4:22 PM, Karsten Ohme wrote: Hi, I would like to know how to handle EntityExistExceptions correctly. I have a DAO layer, which creates entities with persist(). Now I want to know that the creation is really successful. The EntityExistsException may be thrown directly in

Re: EJB3 Timer Beans

2008-04-10 Thread Dain Sundstrom
On Apr 10, 2008, at 12:27 PM, Jay D. McHugh wrote: Hello all. I have been using annotated stateless session timer beans with the number of milliseconds until they expire. This has been working fine. Today, I tried to change over from expiring after a duration to expiring at a particular d

Re: Tomcat EJB3 and Webservice problem

2008-04-03 Thread Dain Sundstrom
hummm... that sounds strange What version of OpenEJB and Tomcat are you using? The integration has gotten quite a few bug fixes since 3.0-beta2 and I suggest you use the latest builds. The 3.0 branch is very stable and we are about to release it, so it is safe to use. The integration ins

Re: EJB Container Settings

2008-04-03 Thread Dain Sundstrom
For JPA beans (3.0 entities) the cache/pool settings are controlled by the JPA implementation. If you haven't explicitly set a JPA provider, you will get OpenJPA. FWIU, OpenJPA doesn't use an object pool since JPA objects are cheaper to create on the fly then it costs to pool instances (I

Re: OptimisticLockException

2008-03-18 Thread Dain Sundstrom
This is one of the more confusing parts of the JPA spec. Although the API looks like you should be getting a pessimistic write lock (select for update in oracle) when you call that method, you actually only get an optimistic lock according to the spec. In order to get a pessimistic lock,

Re: OpenEJB Client with secure socket / SSL

2008-03-05 Thread Dain Sundstrom
If weilu switched to the ejbd over http, can't he secure the communication using the web container's https implementation? -dain On Mar 5, 2008, at 3:10 PM, David Blevins wrote: On Mar 5, 2008, at 2:46 PM, weilu wrote: We have a java application that is a client to geronimo 2.0.2. The c

Re: Errors shutting down Tomcat with OpenEJB 3 Beta-2

2008-02-23 Thread Dain Sundstrom
I believe I have fixed this issue in TRUNK. -dain On Feb 20, 2008, at 10:59 PM, Dain Sundstrom wrote: On Feb 16, 2008, at 12:48 AM, AdamO wrote: I've noticed "INFO: Illegal access:" messages in my Tomcat log while testing beta-2. I haven't had the messages with beta

Re: Problems Testing - native SQL - SELECT FOR UPDATE - Pessimistic Locking

2008-02-21 Thread Dain Sundstrom
The OpenJPA guys said that you need to add the property: openjpa.LockManager=pessimistic to your persistence unit. This will cause OpenJPA to use select for update. -dain On Feb 21, 2008, at 3:34 PM, Karsten Ohme wrote: Dain Sundstrom schrieb: Karsten, This is a much harder problem

Re: Problems Testing - native SQL - SELECT FOR UPDATE - Pessimistic Locking

2008-02-21 Thread Dain Sundstrom
Karsten, This is a much harder problem then it looked like at first glance. The lock system in JPA seems to be designed to do exactly what you want, but when I tried to use it to get a write lock, I get OptimisticExceptions. Based on my reading of the spec, it is technically legal but s

Re: Errors shutting down Tomcat with OpenEJB 3 Beta-2

2008-02-20 Thread Dain Sundstrom
On Feb 16, 2008, at 12:48 AM, AdamO wrote: I've noticed "INFO: Illegal access:" messages in my Tomcat log while testing beta-2. I haven't had the messages with beta-1. Does anyone know what's wrong? There is nothing wrong with your code. This log message is caused by a piece of code I a

Re: Returning complex data types in @WebResult

2008-01-27 Thread Dain Sundstrom
Sounds like Geronimo or Axis2 is not properly setting up the JaxB context. I've used CXF and lists worked for me. -dain On Jan 26, 2008, at 11:02 PM, Cedric Hurst wrote: Update: I was able to get around Geronimo's wsgen error by using @XmlRootElement instead of @XmlType: http://trac2.asse

Re: Returning complex data types in @WebResult

2008-01-26 Thread Dain Sundstrom
FWIU, JaxWS requires that all complex type be annotated with JaxB annotations (this is why the root most exception is a JAXBException). These annotations tell JaxWS how to convert between XML and the Java Object. I think (and I'm not JaxWS expert) you only need to add @XmlType or @XmlRoo

Re: Multiple LEFT JOIN FETCH clauses in EJBQL

2008-01-16 Thread Dain Sundstrom
On Jan 16, 2008, at 3:03 PM, Alexander Saint Croix wrote: Thank you, Dain. This is helpful in that it reinforces my intuition to avoid eager loading for anything that can be replaced by well-written queries. I'd rather the extra data were optionally retrieved than enforced across all app

Re: ClassNotFoundException: JaccProvider$Factory

2008-01-16 Thread Dain Sundstrom
There is something strange going on here. The innermost stack trace is: Caused by: java .lang .ClassNotFoundException:org.apache.openejb.core.security.JaccProvider $Factory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivilege

Re: Multiple LEFT JOIN FETCH clauses in EJBQL

2008-01-16 Thread Dain Sundstrom
On Jan 16, 2008, at 7:16 AM, Alexander Saint Croix wrote: Hey, guys. Is it possible to write an EJBQL query with more than one LEFT JOIN FETCH clause? Sure. Just be careful with outer joins. I always seem to end up getting too much data with them, and end up using trial and error to

Re: openejb-core 3.0.0 snapshot build error

2008-01-10 Thread Dain Sundstrom
Delete /Users/alex/.m2/repository/org/apache/openejb/openejb-core/ 3.0.0-SNAPSHOT/maven-metadata-apache-m2-snapshot.xml from your machine. My guess, is you are behind a proxy and it substituted an error page for that file. Or said another way, I'd bet that if you open that file it contains

Re: Nuking tables on tearDown() for CRUD tests

2008-01-08 Thread Dain Sundstrom
Can you try running each delete query in a separate transaction? Something like this in your session bean: public void clear(String type) { Query query = entityManager.createQuery("DELETE FROM " + type) query.executeUpdate(); } and something like this in the test case: protected voi

Re: Nuking tables on tearDown() for CRUD tests

2008-01-08 Thread Dain Sundstrom
This only works if he shuts down OpenEJB between each test method, which would be slow. -dain On Jan 6, 2008, at 3:44 PM, Jacek Laskowski wrote: On Jan 6, 2008 11:42 PM, Alexander Saint Croix <[EMAIL PROTECTED]> wrote: Dain mentioned that I might completely drop and restart OpenEJB betwee

Re: Possible bug of redeploying package

2008-01-02 Thread Dain Sundstrom
Joe, This is definitely a bug. Can you file a bug report in our JIRA (https://issues.apache.org/jira/browse/OPENEJB)? This is one we will need to get fixed before the next release. Thanks, -dain On Dec 31, 2007, at 7:14 PM, xianzheng wrote: Hi, I tried to hot deploy a jar package us

Re: Configuring DataSources in a managed environment

2007-12-17 Thread Dain Sundstrom
I'd start by putting every thing in a single jar with a persistence.xml. Once you get that working, then you can attempt to split it up. As for actually splitting it up, I think there are two ways to go about it, although I've never tried either. 1) One persistence-unit with code spread

Re: Alternatives to persistence provider properties in persistence.xml file?

2007-12-13 Thread Dain Sundstrom
The openjpa.ConnectionURL, openjpa.ConnectionDriverName, openjpa.ConnectionUserName and openjpa.ConnectionPassword properties are OpenJPA specific properties that you use when you are in an unmanaged environment. When embedded into a managed environment, like OpenEJB, you should use the sp

Re: OpenEJB war for Tomcat 5.5

2007-12-12 Thread Dain Sundstrom
need immediately? -dain On Dec 12, 2007, at 5:56 AM, Paul Spencer wrote: Dain, What is the status of OpenEJB war for Tomcat 5.5? Paul Spencer Dain Sundstrom wrote: I'll take a look at it when I get back from visiting my family for Thanksgiving. -dain On Nov 19, 2007, at 8:08 AM, Pa

Re: OpenEJB war for Tomcat 5.5

2007-11-22 Thread Dain Sundstrom
I'll take a look at it when I get back from visiting my family for Thanksgiving. -dain On Nov 19, 2007, at 8:08 AM, Paul Spencer wrote: Dain, At ApacheCon US you demonstrated the use of an OpenEJB war for Tomcat 6.x as a way of running an EJB 3 application inside a Tomcat container.C

Re: Qeury a boolean column?(using postgresql)

2007-11-22 Thread Dain Sundstrom
lean data type and primary key... then thats it. And also in java i used the java6. So, i suspect my mistake is in the persistence and ejb used... thanks, dycharles Dain Sundstrom wrote: Hi, I'm not sure why this isn't working, so I'm gonna have to attempt to reproduce th

Re: Qeury a boolean column?(using postgresql)

2007-11-15 Thread Dain Sundstrom
Hi, I'm not sure why this isn't working, so I'm gonna have to attempt to reproduce this problem, but I'm going to need a bit more information. Are you using CMP or JPA? Are you using an existing database TABLE or generating one? If existing, can you share the schema for the table? Can you

Re: Where do I get javax.persistence package?

2007-10-23 Thread Dain Sundstrom
quot;Cannot find symbol: class Resources". I also tried with @Resource inside the class like you said, but no success. I added geronimo-activation...jar to my classpath so that the compiler won't give error about the DataSource. Dain Sundstrom wrote: The class level annotation f

Re: Where do I get javax.persistence package?

2007-10-22 Thread Dain Sundstrom
The class level annotation for declaring resource jndi entries is @Resources: @Resources({ @Resource(name="PostgreSQL Database", type=DataSource.class) }) Also the type attribute is a java.lang.Class object not a java.lang.String object. BTW it is much easier to use field injection li

Re: OpenEJB and Hibernate

2007-10-18 Thread Dain Sundstrom
On Oct 18, 2007, at 7:28 AM, Martin Vysny wrote: On Thu, 2007-10-18 at 16:09 +0200, Jacek Laskowski wrote: On 10/18/07, Martin Vysny <[EMAIL PROTECTED]> wrote: The project's not that unusual - simply we can't use JPA nor EJB3.0, because our product will finally be deployed on WebSphere6.1 (

Re: Specifying source queue for message driven bean (MDB)

2007-10-16 Thread Dain Sundstrom
Sounds like you are happy with the MDB configuration but want the queue/FE_QUEUE resource-env-ref in FEInternalServicesEJB to point to queue/FE_QUEUE instead of "Default Queue". This error seem very strange because the code that processes resource- env-ref should never create an queue with I

Re: OpenEJB and Hibernate

2007-10-13 Thread Dain Sundstrom
On Oct 13, 2007, at 11:01 AM, Jacek Laskowski wrote: On 10/13/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote: When you jarjar ASM, you'll get a new jar with all the code in new packages. Ah, that makes sense, but begs a question about legal issues associated with such a repackagin

Re: OpenEJB and Hibernate

2007-10-13 Thread Dain Sundstrom
On Oct 12, 2007, at 2:59 PM, Jacek Laskowski wrote: On 10/12/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote: The ASM FAQ suggests (http://asm.objectweb.org/doc/faq.html) jarjar. If you can figure out how to do this, that would be awesome. We can simply add the repackaged jar to o

Re: OpenEJB and Hibernate

2007-10-12 Thread Dain Sundstrom
On Oct 12, 2007, at 2:41 AM, Martin Vysny wrote: Hi guys, I tried to use Hibernate in OpenEJB (our application unfortunately still does not use JPA - it uses Hibernate directly instead). However, it seems there is a version clash: OpenEJB requires ASM 2.2.3 while Hibernate 3.2.4 requires ASM 1

Re: Missing xbean and commons-dbcp depenencies when building 3-beta1 examples

2007-10-09 Thread Dain Sundstrom
That's weird. Those files are located in out openejb-3rdparty- builds, which is listed in the 3.0-beta-1 tag with the url: http://svn.apache.org/repos/asf/openejb/repo/org/apache/xbean/ xbean-naming/3.2-r579367/ What's really strange is this repository is not listed in the error message

Draft Tomcat plugin documentation

2007-08-17 Thread Dain Sundstrom
If you have some free time, I have written installation instructions for the new OpenEJB plugin for Tomcat, and would like to get as many people as possible to try this out before we ship 3.0. The instruction are currently only for Unix, and only have been tested on my MacBook. To make thi

Re: OpenEJB support for EJB 2.1?

2007-07-07 Thread Dain Sundstrom
What is the schema you are using for the ejb-jar.xml? Here is an snippit from one of our working 2.1 test cases. http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://jav