Re: Websocket @ServerEndpoint Scope

2015-07-27 Thread Romain Manni-Bucau
It is not cdi scoped but its lifecycle is websocket session one - not http session. Le 27 juil. 2015 02:09, "Jonathan Fisher" a écrit : > Hey guys, > > What is the scope of a bean annotated as @ServerEndpoint? If you inject a > @SessionScoped bean into the @ServerEndpoint you get a failure in To

Context lookup problems

2015-07-27 Thread using namespace
I am using CXF interceptor to validate incoming web-service request. If validation is not sunccessful I need to get a connection to database and put some data in it. I have the datasource configuration in context.xml which works normally when I get connection within web-service implementation class

Re: Context lookup problems

2015-07-27 Thread Arthur Portas
Hi, try this JNDI string: java:openejb/ 2015-07-27 13:10 GMT+01:00 using namespace : > I am using CXF interceptor to validate incoming web-service request. If > validation is not sunccessful I need to get a connection to database and > put > some data in it. I have the datasource configuration i

Re: Context lookup problems

2015-07-27 Thread Felipe Jaekel
If you add a reference to the datasource on context.xml it will be available under comp/env too. This was useful to me when I needed that one of my webapps to work on Tomcat and TomEE. 2015-07-27 9:26 GMT-03:00 Arthur Portas : > Hi, > try this JNDI string: > > java:openejb/ > > 2015-07-27 13:10

Re: Context lookup problems

2015-07-27 Thread Uday Gire
Hello Lets say that you define your datasource name or id = oraDev Then, create a below resource reference entry in your application web.xml file: Container jdbc/oraDev Shareable javax.sql.DataSource java:openejb/Resource/oraDev Then in your intercep

Re: Transaction issues using TomEE, JPA, and Spring

2015-07-27 Thread Mike Spencer
I put a sample project on my github page at https://github.com/firelore/transaction-test The DataSource definition is in the README.md. For the purposes of the sample project, there is nothing else in the tomee.xml besides the xml declaration and the tags. The context.xml was modified to incl

Re: Transaction issues using TomEE, JPA, and Spring

2015-07-27 Thread Romain Manni-Bucau
Hi Mike, is it the setup you run on tomee? java:/jdbc/transaction-ds looks suspicious, should be openejb:Resource/jdbc/transaction-ds. Doesnt start out of the box locally for me at least Side note 1: any way to reproduce it with DB2 or HsqlDB or worse case MySQL - SQL Server is not widely insta

Re: Transaction issues using TomEE, JPA, and Spring

2015-07-27 Thread Romain Manni-Bucau
PS: just realized you use an XA DataSource, maybe check end of this page: http://tomee.apache.org/datasource-config.html. I'd go with "two resources definition" to avoid ambiguities. Romain Manni-Bucau @rmannibucau | Blog | Git

Re: Transaction issues using TomEE, JPA, and Spring

2015-07-27 Thread Mike Spencer
Hi Romain, I realize that SQL Server is probably not the best one to use for a sample project, but I did not know how relevant that would be to my issue. I wanted to replicate things as closely to my real project as possible. I updated the project to use an H2 database instead of SQL Server.

Re: Transaction issues using TomEE, JPA, and Spring

2015-07-27 Thread Romain Manni-Bucau
Do you think you could add a test (even if not executed during the build) I could use to reproduce? Think it would be the most relevant. BTW not sure I would get time to install a SQL Server the coming days but running a test is fine. Romain Manni-Bucau @rmannibucau

Re: Transaction issues using TomEE, JPA, and Spring

2015-07-27 Thread Mike Spencer
You should not have to install a SQL Server instance. I updated the project to use H2 Database and it still triggers the issue I am having. The test case I am using is hitting /path>/?transactionId=1. An exception is displayed is displayed to the user. UPDATE WHILE WRITING THIS EMAIL: When I w

Re: Transaction issues using TomEE, JPA, and Spring

2015-07-27 Thread Romain Manni-Bucau
yes looks TxMgr setup is fine Eclipselinks is the default in glassfish and surely more integrated than in tomee, maybe the issue is just this FYI in tomee we have a specific platform server for eclipselinks: jpaProperties.put("eclipselink.target-server", "org.apache.openejb.jpa.integration.ecli