Re: How to confiigure an container managed EntityManger in an embeded server?

2007-08-29 Thread David Blevins


On Aug 28, 2007, at 5:13 AM, Paul Spencer wrote:


David,

I am using Maven 2.  If the example could include a Maven 2 based  
pom without inheriting a parent pom, that would be great.




Definitely.  Looks like another user has some examples with JPA we  
can use here.


Doing some experimenting with an intentionally bad reference to a non- 
existent persistence unit and am not seeing the output a user would  
need to correct things.  Something fishy is definitely going on.   
Going to dig into this more first thing tomorrow.  Likely won't take  
too much longer to steam things out.


-David


Paul Spencer


David Blevins wrote:
That looks exactly right.  Let me see if I can whip up a quick   
example with similar settings and see if we can't figure out what   
might be going.  We need the example anyway.

-David
On Aug 27, 2007, at 9:00 PM, Paul Spencer wrote:

David,
See below.

David Blevins wrote:


On Aug 26, 2007, at 6:44 PM, Paul Spencer wrote:
If you're persistence unit was not found when we attempted to   
resolve  the reference (created via the annotation) during the   
time the bean  as loading, we'd throw one of these which should  
be  logged and would  fail your app:
  throw new IllegalArgumentException("Persistence unit " +
contextInfo.persistenceUnitName + " for persistence-context-ref " +

contextInfo.referenceName + " not found");


I am getting this error, but I believe the datasource is defined.

Below is my configuration.  Is their something missing?

***
* conf/openejb.xml
***
...

JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
JdbcUrl jdbc:derby:openjpa-database;create=true;
UserName
Password

...

***
* ArtifactManagerImpl.java
***
...
@Stateless
public class ArtifactManagerImpl implements ArtifactManager {
@PersistenceContext(unitName = "myDataSource")
private EntityManager entityManager;

public ArtifactManagerImpl() {
}
...

***
* META-INF/persistence.xml
***

  

   org.apache.openjpa.persistence.PersistenceProviderImpl


  java:openejb/Connector/Default JDBC Database

  



-David



Paul Spencer








JPA Examples (was: Re: Setup tutorial?)

2007-08-29 Thread David Blevins


On Aug 28, 2007, at 2:59 PM, deniskulik wrote:


David Blevins wrote:

On Aug 27, 2007, at 11:50 AM, deniskulik wrote:


I will try to look at how things work with jpa, ejbs, mdbs and etc
more
closely. Can anyone please point me to the place where I could find
more or
less up to date info on how they can be configured?


We're working on more examples:  http://issues.apache.org/jira/ 
browse/

OPENEJB-342



Perhaps I could throw in some examples mentioned on the list if you  
dont
mind. Already have a couple of persistence examples, just need to  
polish

them off slightly.


Absolutely, Denis.  That'd be fantastic.  We love to see new people  
helping out, so welcome to the team! :)  And definitely feel welcome  
to dig into anything, make all the suggestions you want and ask all  
the questions you want.


If you let me know your jira id I can add you to the openejb- 
contributors group and assign you any example you'd like.


I think we may have some issues with persistence.xml support when  
people go off the "happy path".  Trying to get an app deployment to  
fail due to bad jpa setup and not getting the kind of feedback I  
would expect.


-David



unsubscribe

2007-08-29 Thread Steve W. Kwee
unsubscribe


RE: unsubscribe

2007-08-29 Thread Olutosin Idowu





From: "Steve W. Kwee" <[EMAIL PROTECTED]>
Reply-To: users@openejb.apache.org
To: 
Subject: unsubscribe
Date: Wed, 29 Aug 2007 23:43:16 +0200

unsubscribe


_
Puzzles, trivia teasers, word scrambles and more. Play for your chance to 
win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink