[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Timothy Perrett

Please list the dependencies you have sent on each module

Cheers, Tim

On Sep 17, 5:32 am, Charles F. Munat c...@munat.com wrote:
 I have a Lift project with a JPA backend subproject, and then two Lift
 front ends that access the same back end, also as subprojects.

 So my master pom.xml looks like this:

    modules
      moduleweb/module
      moduleweb2/module
      modulespa/module
    /modules

 Works beautifully. Web responds on one port and Web2 on another (when I
 use the internal Jetty).

 But when I do mvn package and put the war on the server, somehow the
 spa backend classes do not get included.

 Any idea what I'm doing wrong?

 Chas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Derek Chen-Becker
Are you sure that they're not getting included (e.g. not actually in the WAR
file), or that they're not activated? If your dependency (in the web
modules) on the spa module is default scope, then it should be including
them.

Derek

On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat c...@munat.com wrote:


 I have a Lift project with a JPA backend subproject, and then two Lift
 front ends that access the same back end, also as subprojects.

 So my master pom.xml looks like this:

   modules
 moduleweb/module
 moduleweb2/module
 modulespa/module
   /modules

 Works beautifully. Web responds on one port and Web2 on another (when I
 use the internal Jetty).

 But when I do mvn package and put the war on the server, somehow the
 spa backend classes do not get included.

 Any idea what I'm doing wrong?

 Chas.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Charles F. Munat

Actually, I figured that out. They're included. But I have a different 
problem now -- one that you might know the answer to.

I'm loading this war file up in JBossWeb (basically a hopped-up Tomcat) 
and when I try to use it, I get a problem with transactions. I assume 
this is something in the JBossWeb server, since I have nothing in my 
code to cause that. Something on the server wants that jta.jar in there.

So I tried commenting out the javax.transaction exclusion in the pom.xml 
file for the spa project, and that added the jta jar to the lib, as 
expected. That also solved the problem with the server.

But now when I merge objects to the database, the objects are created, 
but none of the properties are saved. It's very strange. I am wondering 
if this is a transaction issue.

And just out of curiosity, why is the javax.transaction exclusion in 
there? I've often wondered about that.

Chas.

Derek Chen-Becker wrote:
 Are you sure that they're not getting included (e.g. not actually in the 
 WAR file), or that they're not activated? If your dependency (in the web 
 modules) on the spa module is default scope, then it should be including 
 them.
 
 Derek
 
 On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 I have a Lift project with a JPA backend subproject, and then two Lift
 front ends that access the same back end, also as subprojects.
 
 So my master pom.xml looks like this:
 
   modules
 moduleweb/module
 moduleweb2/module
 modulespa/module
   /modules
 
 Works beautifully. Web responds on one port and Web2 on another (when I
 use the internal Jetty).
 
 But when I do mvn package and put the war on the server, somehow the
 spa backend classes do not get included.
 
 Any idea what I'm doing wrong?
 
 Chas.
 
 
 
 
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Derek Chen-Becker
JBoss includes its own JTA libs, so you need to set the scope to exclude the
other ones or else they'll conflict. Generally with any JEE container you
would need to do that, since JTA is part of the spec. What exactly do you
mean by the objects are created, but none of the properties are saved? Is
an insert occurring but no fields are saved? If it's transaction related
it's almost always a binary outcome (works/doesn't work), not something in
between, although I've seen enough oddities to know that there are always
exceptions :P

Derek

On Thu, Sep 17, 2009 at 12:03 PM, Charles F. Munat c...@munat.com wrote:


 Actually, I figured that out. They're included. But I have a different
 problem now -- one that you might know the answer to.

 I'm loading this war file up in JBossWeb (basically a hopped-up Tomcat)
 and when I try to use it, I get a problem with transactions. I assume
 this is something in the JBossWeb server, since I have nothing in my
 code to cause that. Something on the server wants that jta.jar in there.

 So I tried commenting out the javax.transaction exclusion in the pom.xml
 file for the spa project, and that added the jta jar to the lib, as
 expected. That also solved the problem with the server.

 But now when I merge objects to the database, the objects are created,
 but none of the properties are saved. It's very strange. I am wondering
 if this is a transaction issue.

 And just out of curiosity, why is the javax.transaction exclusion in
 there? I've often wondered about that.

 Chas.

 Derek Chen-Becker wrote:
  Are you sure that they're not getting included (e.g. not actually in the
  WAR file), or that they're not activated? If your dependency (in the web
  modules) on the spa module is default scope, then it should be including
  them.
 
  Derek
 
  On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  I have a Lift project with a JPA backend subproject, and then two
 Lift
  front ends that access the same back end, also as subprojects.
 
  So my master pom.xml looks like this:
 
modules
  moduleweb/module
  moduleweb2/module
  modulespa/module
/modules
 
  Works beautifully. Web responds on one port and Web2 on another (when
 I
  use the internal Jetty).
 
  But when I do mvn package and put the war on the server, somehow the
  spa backend classes do not get included.
 
  Any idea what I'm doing wrong?
 
  Chas.
 
 
 
 
  

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Derek Chen-Becker
Also, if you're loading this up in JBoss, it might make more sense to bundle
the artifacts into an EAR, unless you intend for the two web modules to have
completely separate persistence units (e.g. different DBs, etc). Maven has a
nice plugin for doing EARs. I can send a sample pom.xml if you'd like.

Derek

On Thu, Sep 17, 2009 at 1:01 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 JBoss includes its own JTA libs, so you need to set the scope to exclude
 the other ones or else they'll conflict. Generally with any JEE container
 you would need to do that, since JTA is part of the spec. What exactly do
 you mean by the objects are created, but none of the properties are saved?
 Is an insert occurring but no fields are saved? If it's transaction related
 it's almost always a binary outcome (works/doesn't work), not something in
 between, although I've seen enough oddities to know that there are always
 exceptions :P

 Derek


 On Thu, Sep 17, 2009 at 12:03 PM, Charles F. Munat c...@munat.com wrote:


 Actually, I figured that out. They're included. But I have a different
 problem now -- one that you might know the answer to.

 I'm loading this war file up in JBossWeb (basically a hopped-up Tomcat)
 and when I try to use it, I get a problem with transactions. I assume
 this is something in the JBossWeb server, since I have nothing in my
 code to cause that. Something on the server wants that jta.jar in there.

 So I tried commenting out the javax.transaction exclusion in the pom.xml
 file for the spa project, and that added the jta jar to the lib, as
 expected. That also solved the problem with the server.

 But now when I merge objects to the database, the objects are created,
 but none of the properties are saved. It's very strange. I am wondering
 if this is a transaction issue.

 And just out of curiosity, why is the javax.transaction exclusion in
 there? I've often wondered about that.

 Chas.

 Derek Chen-Becker wrote:
  Are you sure that they're not getting included (e.g. not actually in the
  WAR file), or that they're not activated? If your dependency (in the web
  modules) on the spa module is default scope, then it should be including
  them.
 
  Derek
 
  On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  I have a Lift project with a JPA backend subproject, and then two
 Lift
  front ends that access the same back end, also as subprojects.
 
  So my master pom.xml looks like this:
 
modules
  moduleweb/module
  moduleweb2/module
  modulespa/module
/modules
 
  Works beautifully. Web responds on one port and Web2 on another
 (when I
  use the internal Jetty).
 
  But when I do mvn package and put the war on the server, somehow the
  spa backend classes do not get included.
 
  Any idea what I'm doing wrong?
 
  Chas.
 
 
 
 
  

 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Charles F. Munat

It's not the AS, it's the souped-up Tomcat (JBoss Web). All their 
examples are WARs. But sure, send an EAR along, Mr. Van Gogh.

Chas.

Derek Chen-Becker wrote:
 Also, if you're loading this up in JBoss, it might make more sense to 
 bundle the artifacts into an EAR, unless you intend for the two web 
 modules to have completely separate persistence units (e.g. different 
 DBs, etc). Maven has a nice plugin for doing EARs. I can send a sample 
 pom.xml if you'd like.
 
 Derek
 
 On Thu, Sep 17, 2009 at 1:01 PM, Derek Chen-Becker 
 dchenbec...@gmail.com mailto:dchenbec...@gmail.com wrote:
 
 JBoss includes its own JTA libs, so you need to set the scope to
 exclude the other ones or else they'll conflict. Generally with any
 JEE container you would need to do that, since JTA is part of the
 spec. What exactly do you mean by the objects are created, but none
 of the properties are saved? Is an insert occurring but no fields
 are saved? If it's transaction related it's almost always a binary
 outcome (works/doesn't work), not something in between, although
 I've seen enough oddities to know that there are always exceptions :P
 
 Derek
 
 
 On Thu, Sep 17, 2009 at 12:03 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
 
 
 Actually, I figured that out. They're included. But I have a
 different
 problem now -- one that you might know the answer to.
 
 I'm loading this war file up in JBossWeb (basically a hopped-up
 Tomcat)
 and when I try to use it, I get a problem with transactions. I
 assume
 this is something in the JBossWeb server, since I have nothing in my
 code to cause that. Something on the server wants that jta.jar
 in there.
 
 So I tried commenting out the javax.transaction exclusion in the
 pom.xml
 file for the spa project, and that added the jta jar to the
 lib, as
 expected. That also solved the problem with the server.
 
 But now when I merge objects to the database, the objects are
 created,
 but none of the properties are saved. It's very strange. I am
 wondering
 if this is a transaction issue.
 
 And just out of curiosity, why is the javax.transaction exclusion in
 there? I've often wondered about that.
 
 Chas.
 
 Derek Chen-Becker wrote:
   Are you sure that they're not getting included (e.g. not
 actually in the
   WAR file), or that they're not activated? If your dependency
 (in the web
   modules) on the spa module is default scope, then it should
 be including
   them.
  
   Derek
  
   On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat
 c...@munat.com mailto:c...@munat.com
   mailto:c...@munat.com mailto:c...@munat.com wrote:
  
  
   I have a Lift project with a JPA backend subproject, and
 then two Lift
   front ends that access the same back end, also as
 subprojects.
  
   So my master pom.xml looks like this:
  
 modules
   moduleweb/module
   moduleweb2/module
   modulespa/module
 /modules
  
   Works beautifully. Web responds on one port and Web2 on
 another (when I
   use the internal Jetty).
  
   But when I do mvn package and put the war on the server,
 somehow the
   spa backend classes do not get included.
  
   Any idea what I'm doing wrong?
  
   Chas.
  
  
  
  
   
 
 
 
 
 
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Charles F. Munat

Yes, I would expect the work/doesn't result, too. So maybe it's 
correlation not causation and I should look for something else. It's 
definitely saving the objects, just not updating the fields. Weird.

(Works fine when I use the embedded Jetty.)

Nothing in Puterland is easy. Sigh...

Chas.

Derek Chen-Becker wrote:
 JBoss includes its own JTA libs, so you need to set the scope to exclude 
 the other ones or else they'll conflict. Generally with any JEE 
 container you would need to do that, since JTA is part of the spec. What 
 exactly do you mean by the objects are created, but none of the 
 properties are saved? Is an insert occurring but no fields are saved? 
 If it's transaction related it's almost always a binary outcome 
 (works/doesn't work), not something in between, although I've seen 
 enough oddities to know that there are always exceptions :P
 
 Derek
 
 On Thu, Sep 17, 2009 at 12:03 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 Actually, I figured that out. They're included. But I have a different
 problem now -- one that you might know the answer to.
 
 I'm loading this war file up in JBossWeb (basically a hopped-up Tomcat)
 and when I try to use it, I get a problem with transactions. I assume
 this is something in the JBossWeb server, since I have nothing in my
 code to cause that. Something on the server wants that jta.jar in there.
 
 So I tried commenting out the javax.transaction exclusion in the pom.xml
 file for the spa project, and that added the jta jar to the lib, as
 expected. That also solved the problem with the server.
 
 But now when I merge objects to the database, the objects are created,
 but none of the properties are saved. It's very strange. I am wondering
 if this is a transaction issue.
 
 And just out of curiosity, why is the javax.transaction exclusion in
 there? I've often wondered about that.
 
 Chas.
 
 Derek Chen-Becker wrote:
   Are you sure that they're not getting included (e.g. not actually
 in the
   WAR file), or that they're not activated? If your dependency (in
 the web
   modules) on the spa module is default scope, then it should be
 including
   them.
  
   Derek
  
   On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat
 c...@munat.com mailto:c...@munat.com
   mailto:c...@munat.com mailto:c...@munat.com wrote:
  
  
   I have a Lift project with a JPA backend subproject, and then
 two Lift
   front ends that access the same back end, also as subprojects.
  
   So my master pom.xml looks like this:
  
 modules
   moduleweb/module
   moduleweb2/module
   modulespa/module
 /modules
  
   Works beautifully. Web responds on one port and Web2 on
 another (when I
   use the internal Jetty).
  
   But when I do mvn package and put the war on the server,
 somehow the
   spa backend classes do not get included.
  
   Any idea what I'm doing wrong?
  
   Chas.
  
  
  
  
   
 
 
 
 
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Derek Chen-Becker
OK, well, I don't know if this will work in JBoss Web, but here it is
anyways. This shows how you can create an EAR from some web modules, a JPA
module and a library (shared between all three classloaders). Note that the
plugin configuration defines the order that the modules are loaded, which is
why the spa module is first.

Derek

On Thu, Sep 17, 2009 at 2:24 PM, Charles F. Munat c...@munat.com wrote:


 It's not the AS, it's the souped-up Tomcat (JBoss Web). All their
 examples are WARs. But sure, send an EAR along, Mr. Van Gogh.

 Chas.

 Derek Chen-Becker wrote:
  Also, if you're loading this up in JBoss, it might make more sense to
  bundle the artifacts into an EAR, unless you intend for the two web
  modules to have completely separate persistence units (e.g. different
  DBs, etc). Maven has a nice plugin for doing EARs. I can send a sample
  pom.xml if you'd like.
 
  Derek
 
  On Thu, Sep 17, 2009 at 1:01 PM, Derek Chen-Becker
  dchenbec...@gmail.com mailto:dchenbec...@gmail.com wrote:
 
  JBoss includes its own JTA libs, so you need to set the scope to
  exclude the other ones or else they'll conflict. Generally with any
  JEE container you would need to do that, since JTA is part of the
  spec. What exactly do you mean by the objects are created, but none
  of the properties are saved? Is an insert occurring but no fields
  are saved? If it's transaction related it's almost always a binary
  outcome (works/doesn't work), not something in between, although
  I've seen enough oddities to know that there are always exceptions :P
 
  Derek
 
 
  On Thu, Sep 17, 2009 at 12:03 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  Actually, I figured that out. They're included. But I have a
  different
  problem now -- one that you might know the answer to.
 
  I'm loading this war file up in JBossWeb (basically a hopped-up
  Tomcat)
  and when I try to use it, I get a problem with transactions. I
  assume
  this is something in the JBossWeb server, since I have nothing in
 my
  code to cause that. Something on the server wants that jta.jar
  in there.
 
  So I tried commenting out the javax.transaction exclusion in the
  pom.xml
  file for the spa project, and that added the jta jar to the
  lib, as
  expected. That also solved the problem with the server.
 
  But now when I merge objects to the database, the objects are
  created,
  but none of the properties are saved. It's very strange. I am
  wondering
  if this is a transaction issue.
 
  And just out of curiosity, why is the javax.transaction exclusion
 in
  there? I've often wondered about that.
 
  Chas.
 
  Derek Chen-Becker wrote:
Are you sure that they're not getting included (e.g. not
  actually in the
WAR file), or that they're not activated? If your dependency
  (in the web
modules) on the spa module is default scope, then it should
  be including
them.
   
Derek
   
On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat
  c...@munat.com mailto:c...@munat.com
mailto:c...@munat.com mailto:c...@munat.com wrote:
   
   
I have a Lift project with a JPA backend subproject, and
  then two Lift
front ends that access the same back end, also as
  subprojects.
   
So my master pom.xml looks like this:
   
  modules
moduleweb/module
moduleweb2/module
modulespa/module
  /modules
   
Works beautifully. Web responds on one port and Web2 on
  another (when I
use the internal Jetty).
   
But when I do mvn package and put the war on the server,
  somehow the
spa backend classes do not get included.
   
Any idea what I'm doing wrong?
   
Chas.
   
   
   
   

 
 
 
 
 
  

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---

?xml version=1.0?project
  parent
groupIdcom.foo/groupId
artifactIdMaster/artifactId
version1.0-SNAPSHOT/version
  /parent
  modelVersion4.0.0/modelVersion
  artifactIdEAR-Build/artifactId
  

[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Charles F. Munat

Excellent. Thanks!

Derek Chen-Becker wrote:
 OK, well, I don't know if this will work in JBoss Web, but here it is 
 anyways. This shows how you can create an EAR from some web modules, a 
 JPA module and a library (shared between all three classloaders). Note 
 that the plugin configuration defines the order that the modules are 
 loaded, which is why the spa module is first.
 
 Derek
 
 On Thu, Sep 17, 2009 at 2:24 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 It's not the AS, it's the souped-up Tomcat (JBoss Web). All their
 examples are WARs. But sure, send an EAR along, Mr. Van Gogh.
 
 Chas.
 
 Derek Chen-Becker wrote:
   Also, if you're loading this up in JBoss, it might make more sense to
   bundle the artifacts into an EAR, unless you intend for the two web
   modules to have completely separate persistence units (e.g. different
   DBs, etc). Maven has a nice plugin for doing EARs. I can send a
 sample
   pom.xml if you'd like.
  
   Derek
  
   On Thu, Sep 17, 2009 at 1:01 PM, Derek Chen-Becker
   dchenbec...@gmail.com mailto:dchenbec...@gmail.com
 mailto:dchenbec...@gmail.com mailto:dchenbec...@gmail.com wrote:
  
   JBoss includes its own JTA libs, so you need to set the scope to
   exclude the other ones or else they'll conflict. Generally
 with any
   JEE container you would need to do that, since JTA is part of the
   spec. What exactly do you mean by the objects are created,
 but none
   of the properties are saved? Is an insert occurring but no
 fields
   are saved? If it's transaction related it's almost always a
 binary
   outcome (works/doesn't work), not something in between, although
   I've seen enough oddities to know that there are always
 exceptions :P
  
   Derek
  
  
   On Thu, Sep 17, 2009 at 12:03 PM, Charles F. Munat
 c...@munat.com mailto:c...@munat.com
   mailto:c...@munat.com mailto:c...@munat.com wrote:
  
  
   Actually, I figured that out. They're included. But I have a
   different
   problem now -- one that you might know the answer to.
  
   I'm loading this war file up in JBossWeb (basically a
 hopped-up
   Tomcat)
   and when I try to use it, I get a problem with
 transactions. I
   assume
   this is something in the JBossWeb server, since I have
 nothing in my
   code to cause that. Something on the server wants that
 jta.jar
   in there.
  
   So I tried commenting out the javax.transaction exclusion
 in the
   pom.xml
   file for the spa project, and that added the jta jar to the
   lib, as
   expected. That also solved the problem with the server.
  
   But now when I merge objects to the database, the objects are
   created,
   but none of the properties are saved. It's very strange. I am
   wondering
   if this is a transaction issue.
  
   And just out of curiosity, why is the javax.transaction
 exclusion in
   there? I've often wondered about that.
  
   Chas.
  
   Derek Chen-Becker wrote:
 Are you sure that they're not getting included (e.g. not
   actually in the
 WAR file), or that they're not activated? If your
 dependency
   (in the web
 modules) on the spa module is default scope, then it
 should
   be including
 them.

 Derek

 On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat
   c...@munat.com mailto:c...@munat.com
 mailto:c...@munat.com mailto:c...@munat.com
 mailto:c...@munat.com mailto:c...@munat.com
 mailto:c...@munat.com mailto:c...@munat.com wrote:


 I have a Lift project with a JPA backend
 subproject, and
   then two Lift
 front ends that access the same back end, also as
   subprojects.

 So my master pom.xml looks like this:

   modules
 moduleweb/module
 moduleweb2/module
 modulespa/module
   /modules

 Works beautifully. Web responds on one port and
 Web2 on
   another (when I
 use the internal Jetty).

 But when I do mvn package and put the war on the
 server,
   somehow the

[Lift] Re: JPA with more than one front end (Maven! sigh...)

2009-09-17 Thread Chris Lewis



Charles F. Munat wrote:
 It's not the AS, it's the souped-up Tomcat (JBoss Web). All their 
 examples are WARs. But sure, send an EAR along, Mr. Van Gogh.

nice.

 
 Chas.
 
 Derek Chen-Becker wrote:
 Also, if you're loading this up in JBoss, it might make more sense to 
 bundle the artifacts into an EAR, unless you intend for the two web 
 modules to have completely separate persistence units (e.g. different 
 DBs, etc). Maven has a nice plugin for doing EARs. I can send a sample 
 pom.xml if you'd like.

 Derek

 On Thu, Sep 17, 2009 at 1:01 PM, Derek Chen-Becker 
 dchenbec...@gmail.com mailto:dchenbec...@gmail.com wrote:

 JBoss includes its own JTA libs, so you need to set the scope to
 exclude the other ones or else they'll conflict. Generally with any
 JEE container you would need to do that, since JTA is part of the
 spec. What exactly do you mean by the objects are created, but none
 of the properties are saved? Is an insert occurring but no fields
 are saved? If it's transaction related it's almost always a binary
 outcome (works/doesn't work), not something in between, although
 I've seen enough oddities to know that there are always exceptions :P

 Derek


 On Thu, Sep 17, 2009 at 12:03 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:


 Actually, I figured that out. They're included. But I have a
 different
 problem now -- one that you might know the answer to.

 I'm loading this war file up in JBossWeb (basically a hopped-up
 Tomcat)
 and when I try to use it, I get a problem with transactions. I
 assume
 this is something in the JBossWeb server, since I have nothing in my
 code to cause that. Something on the server wants that jta.jar
 in there.

 So I tried commenting out the javax.transaction exclusion in the
 pom.xml
 file for the spa project, and that added the jta jar to the
 lib, as
 expected. That also solved the problem with the server.

 But now when I merge objects to the database, the objects are
 created,
 but none of the properties are saved. It's very strange. I am
 wondering
 if this is a transaction issue.

 And just out of curiosity, why is the javax.transaction exclusion in
 there? I've often wondered about that.

 Chas.

 Derek Chen-Becker wrote:
   Are you sure that they're not getting included (e.g. not
 actually in the
   WAR file), or that they're not activated? If your dependency
 (in the web
   modules) on the spa module is default scope, then it should
 be including
   them.
  
   Derek
  
   On Wed, Sep 16, 2009 at 10:32 PM, Charles F. Munat
 c...@munat.com mailto:c...@munat.com
   mailto:c...@munat.com mailto:c...@munat.com wrote:
  
  
   I have a Lift project with a JPA backend subproject, and
 then two Lift
   front ends that access the same back end, also as
 subprojects.
  
   So my master pom.xml looks like this:
  
 modules
   moduleweb/module
   moduleweb2/module
   modulespa/module
 /modules
  
   Works beautifully. Web responds on one port and Web2 on
 another (when I
   use the internal Jetty).
  
   But when I do mvn package and put the war on the server,
 somehow the
   spa backend classes do not get included.
  
   Any idea what I'm doing wrong?
  
   Chas.
  
  
  
  
   





 
  
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---