Re: OpenEJB vs JBoss

2012-03-15 Thread Anthony Fryer
It would be nice to have a SecurityService that allowed you to use the Servlet api to enforce role based security and authorization when using openejb in *embedded* mode inside a servlet container. The HttpServletRequest api gives you isUserInRole() getRemoteUser() The ejb SessionContext

Re: OpenEJB 4.0.0-beta-2 : ERROR - Error in safeBind method

2012-04-04 Thread Anthony Fryer
How are you trying to get an instance of the session bean (@Inject, @EJB or jndi lookup)? If you're doing a jndi lookup, do you have an ejb-local-ref for the session bean in your web.xml and then lookup using java:comp/env/ItemFacade? ejb-local-ref ejb-ref-nameItemFacade/ejb-ref-name

Re: Can you inject a JAXBContext?

2012-05-08 Thread Anthony Fryer
I was asking because creating a JAXBContext requires me to specify the ObjectFactory classes to the newInstance method. I assume jax-ws must somehow create its own JAXBContext and work out which classes it needs to pass to the newInstance method. I'm just guessing here and was hoping you guys

ejb dependency jar in war file WEB-INF/lib instead of tomee/lib?

2012-05-16 Thread Anthony Fryer
I have a stateless session ejb (which is also a webservice) contained in a jar that is deployed in the WEB-INF/lib folder of a webapp that i deploy to tomee and it has a dependency on saxon-he-9.4.jar. I find that i can only successfully deploy the ejb if saxon-he-9.4.jar is in the tomee/lib

Re: ejb dependency jar in war file WEB-INF/lib instead of tomee/lib?

2012-05-16 Thread Anthony Fryer
I have my ejb project pom.xml i have... dependency groupIdnet.sf.saxon/groupId artifactIdSaxon-HE/artifactId version9.4/version scopecompile/scope /dependency I then have a stateless ejb like this... @Stateless public class BeanA { XQDataSource xqds; } My ejb project is packaged up

Can you configure tomee to not scan a jar in WEB-INF/lib?

2012-05-21 Thread Anthony Fryer
I have a big jar file (9Mb) that only contains resources in /META-INF/resources and no java classes. I deploy this in WEB-INF/lib of my war file. I was wondering if it is possible to somehow tell tomee to not scan just this one jar file when the application deploys? -- View this message in

Re: Can you configure tomee to not scan a jar in WEB-INF/lib?

2012-05-21 Thread Anthony Fryer
Thanks, worked perfectly. -- View this message in context: http://openejb.979440.n4.nabble.com/Can-you-configure-tomee-to-not-scan-a-jar-in-WEB-INF-lib-tp4649006p4649037.html Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: tomee tryout - datasource with jpa drives me crazy

2012-05-29 Thread Anthony Fryer
Maybe post a log of what's happening at startup. I would check to see if the datasource you configured is actually being created successfully. Can you inject the datasource and use it directly to confirm it has been created? Also what is your skepticism about JavaEE? Are you happy with Java,

Re: Tomee Plus instead of Glassfish

2012-06-04 Thread Anthony Fryer
I understand the good intentions but have to disagree that you should allow a bug just because glassfish also allows it. At what point do you look at a container and say, they allow this therefore I should also allow it so its easier for them to migrate to my container? Why select only

Re: richfaces 4.2.2 deploy problem

2012-06-06 Thread Anthony Fryer
I had a similar problem recently (http://openejb.979440.n4.nabble.com/Can-you-configure-tomee-to-not-scan-a-jar-in-WEB-INF-lib-td4649006.html) caused by tomee scanning a jar file i had in my WEB-INF/lib. Fortunately for me, the offending jar file didn't contain any managed beans, so i was able to

RE: richfaces 4.2.2 deploy problem

2012-06-06 Thread Anthony Fryer
I created a file conf/exclusions.list to exclude my jar file. The contents of exclusions.list i used is below. Maybe try using this file and adding jar files you want to exclude to the end. ApacheJMeter XmlSchema- activation- activeio- activemq- aether- antlr- aopalliance- avalon-framework-

Re: Feedback on TomEE 1.0.0

2012-06-08 Thread Anthony Fryer
I have been using tomee with eclipse for about 19 months now and i can verify that the 1.0.0 release makes it much alot easier than it was. Before that, you had alot more work to do if you wanted to use workspace metadata as the server location. Now it works out of the box. I also think m2e has

Re: Feedback on TomEE 1.0.0

2012-06-08 Thread Anthony Fryer
With m2e-wtp you don't need to adjust any of the deployment assembly settings. Also with m2e you don't need the eclipse maven plugin. Just create a standard maven project and then import it into eclipse. m2e will configure most of eclipse automatically. For those plugins that eclipse can't

Re: Feedback on TomEE 1.0.0

2012-06-09 Thread Anthony Fryer
You don't need that lifecycle plugin i showed unless m2e tells you that you need it. So I'm glad to hear you seem to be up and running now. The use workspace metadata (does not modify tomcat installation) is the option i use with my tomee server in eclipse. I have also seen the documentation

Re: Feedback on TomEE 1.0.0

2012-06-12 Thread Anthony Fryer
I'll do a blog about setting up using eclipse, maven and tomee. Do you have a tomee blog site that i can use? -- View this message in context: http://openejb.979440.n4.nabble.com/Feedback-on-TomEE-1-0-0-tp4655483p4655571.html Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: CMP failed with 3 layered Object structure

2012-06-13 Thread Anthony Fryer
Your haven't defined the transaction scope on your ejb methods. Try adding the annotation @TransactionAttribute(TransactionAttributeType.REQUIRED) to your getCustomer method... @Override @TransactionAttribute(TransactionAttributeType.REQUIRED) public Customer getCustomer(

Re: CMP failed with 3 layered Object structure

2012-06-13 Thread Anthony Fryer
I may have misunderstood your current issue. It seems you are able to get a successful response if you call the getContactList().size() method before returning from your method. If that is the case then adding the @TransactionAttribute will probably not change anything. The issue you are having

SessionContext isCallerInRole always returns null

2012-06-20 Thread Anthony Fryer
I have a Stateless Session EJB with an injected SessionContext. I have a method where i try to use the isCallerInRole method to determine if a user is an ADMIN user or not but this method always returns null, even for users that are ADMIN users. The code is below... @Stateless public class

SessionContext isCallerInRole always returns false

2012-06-20 Thread Anthony Fryer
I have a Stateless Session EJB with an injected SessionContext. I have a method where i try to use the isCallerInRole method to determine if a user is an ADMIN user or not but this method always returns false, even for users that are ADMIN users. The code is below... @Stateless public class

Re: SessionContext isCallerInRole always returns false

2012-06-20 Thread Anthony Fryer
I include a META-INF/context.xml file in my war file, the contents are below... ?xml version=1.0 encoding=UTF-8? Context Realm className=org.apache.catalina.realm.DataSourceRealm dataSourceName=pokerDatabase localDataSource=true digest=MD5

Re: Tomee on port 80 on Linux in Production

2012-07-10 Thread Anthony Fryer
I've got a tomee installation running on debian and it listens on port 80. There's a few options. As already mentioned you could run apache httpd server on port 80 and create a virtual host that reverse proxies to your tomee server running on port 8080. I originally had that setup and it works

Re: war packaged exclusions.list

2012-07-20 Thread Anthony Fryer
I am excluding different jar files for different reasons. One jar file i have just contains the dojo javascript library. I just put all the js files in the META-INF/resources/dojo-1.7.1 folder of the jar file, deploy that in WEB-INF/lib and i can then access all the js files from my webapp. I

Re: war packaged exclusions.list

2012-07-20 Thread Anthony Fryer
Yep..got some spring in there (mvc)...but its on its way out eventually. -- View this message in context: http://openejb.979440.n4.nabble.com/war-packaged-exclusions-list-tp4656366p4656441.html Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JavaMail Session with Authentication

2012-08-29 Thread Anthony Fryer
I had the same issue and discovered that the password isn't actually used by openejb. I implemented a solution described here... http://openejb.979440.n4.nabble.com/javax-mail-Session-resource-and-smtp-authentication-td4322915.html -- View this message in context:

Re: JavaMail Session with Authentication

2012-08-30 Thread Anthony Fryer
Thanks for raising the JIRA. It would be nice to get the smtp authentication built into tomee. -- View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-Session-with-Authentication-tp4657144p4657175.html Sent from the OpenEJB User mailing list archive at Nabble.com.

Can you Deploy a JCA resource adapter in a WAR?

2012-09-19 Thread Anthony Fryer
I currently have an application that interacts with a vendor application using web services. I use jax-ws and call the web services directly from servlets packaged up in my war file. I'm now looking at using JCA to interact with the vendor application. I like the encapsulation of the

Re: Can you Deploy a JCA resource adapter in a WAR?

2012-09-19 Thread Anthony Fryer
I haven't yet tried. I haven't used jca before so wasn't sure if it was possible to do that. I'll try it. -- View this message in context: http://openejb.979440.n4.nabble.com/Can-you-Deploy-a-JCA-resource-adapter-in-a-WAR-tp4657504p4657533.html Sent from the OpenEJB User mailing list archive

Re: Different module share same container?

2012-09-19 Thread Anthony Fryer
I went through the same process of trying to speed up my test case execution by only instantiating a single container. I was able to setup my test cases so that only a single container is instantiated and each unit test can re-use the same container. This is only within a single maven module

Re: Difference of initializing context

2012-09-22 Thread Anthony Fryer
You don't need the application-client.xml file if you use the @ManagedBean annotation on your unit test classes instead of @LocalClient. Using @ManagedBean also means @Inject will work in your test cases and you can re-use the same container across mutlipe junit tests. Using @LocalClient you

Re: JPA Load-Time Enhancement

2012-10-24 Thread Anthony Fryer
+1 for this. I raised a JIRA here https://issues.apache.org/jira/browse/TOMEE-501 -- View this message in context: http://openejb.979440.n4.nabble.com/JPA-Load-Time-Enhancement-tp4658181p4658247.html Sent from the OpenEJB User mailing list archive at Nabble.com.

openejb not destroying ManagedConnections on shutdown

2012-11-22 Thread Anthony Fryer
I am unit testing a JCA adapter and am interested in what happens when the container shutsdown. My test case is below... I was hoping to see the ManageConnection destroy() method being called once when the openejb container shutdown. It wasn't called but the cleanup() method was called twice

Re: openejb not destroying ManagedConnections on shutdown

2012-11-22 Thread Anthony Fryer
I still think destroy should be called at some point. The jca spec states this is when the resource adapter can destroy physical connections and reclaim system resources... An application server should explicitly call ManagedConnection.destroy to destroy a physical connection. An application

Re: openejb not destroying ManagedConnections on shutdown

2012-11-26 Thread Anthony Fryer
Is there another configuration file that controls tomee ManagedConnectionFactories? I'm just using ra.xml but am starting to think their could be another that configures container specific pool implementations. For example, weblogic has a weblogic-ra.xml file that you can use to configure pool

Re: openejb not destroying ManagedConnections on shutdown

2012-11-26 Thread Anthony Fryer
I can't see in the documentation how to configure a custom JCA resource. Can you provide an example? I don't know which resource type i should use. I tried the actual class name but got an error. My test case code... @BeforeClass public static void beforeClass() throws

Re: openejb not destroying ManagedConnections on shutdown

2012-11-28 Thread Anthony Fryer
I have just tested weblogic and it does destroy ManagedConnections when the server shuts down. I think openejb should too. -- View this message in context: http://openejb.979440.n4.nabble.com/openejb-not-destroying-ManagedConnections-on-shutdown-tp4658799p4658977.html Sent from the OpenEJB

Re: openejb not destroying ManagedConnections on shutdown

2012-11-28 Thread Anthony Fryer
I have my test case class below. When I run this test case, i don't see the destroy() method being called on a ManagedConnection... package com.virginaustralia.sabre.jca; import java.util.Properties; import javax.annotation.Resource; import javax.naming.Context; import

Re: openejb not destroying ManagedConnections on shutdown

2012-11-28 Thread Anthony Fryer
Might be a while until i can create one that i can share. Will let you know when i have it. -- View this message in context: http://openejb.979440.n4.nabble.com/openejb-not-destroying-ManagedConnections-on-shutdown-tp4658799p4658981.html Sent from the OpenEJB User mailing list archive at

How can i programmatically bind an object to the JNDI?

2012-12-05 Thread Anthony Fryer
I have a very simple test case where i just bind a string to the jndi and then attempt to look it up. This is failing with a NameNotFoundException in the testReadFromJNDI test. What am i doing wrong here? public class JNDITest { private static InitialContext initialContext;

Re: How can i programmatically bind an object to the JNDI?

2012-12-05 Thread Anthony Fryer
I just discovered that the above test case is working if i run it within a maven build. However it fails if i run it from eclipse. Maybe its a junit version or eclipse issue. -- View this message in context:

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Anthony Fryer
Romain, you're opinion means alot so i'm wondering why you are against JMS in this case. This kind of pattern happens alot in my experience. In this case a timer job executes that finds a list of jobs to execute, in this case read a list of emails and for each email insert a row into a database.

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Anthony Fryer
Ok so what i'm hearing is that you're against the idea because you don't trust the implementation of JMS included in tomee? -- View this message in context: http://openejb.979440.n4.nabble.com/Re-Why-are-Tomcat-s-threads-more-costly-than-background-threads-tp4659429p4659713.html Sent from the

Re: Why are Tomcat's threads more costly than background threads?

2012-12-16 Thread Anthony Fryer
Yes i've done this before a few times and had really good results using weblogic. I must say i have an element of doubt about it with Romain not liking it though. I've used ActiveMQ before and not encountered issues but these guys are the tomee devs and I'd go with what they say. -- View this

Re: openejb not destroying ManagedConnections on shutdown

2013-01-01 Thread Anthony Fryer
I've finally managed to create a project that has a simple jca resource adapter and associated unit test. You can get it from https://github.com/httpants/jcatest. The openejb container never calls the destroy method on the managed connections when the container is shutdown, only the cleanup

Re: openejb not destroying ManagedConnections on shutdown

2013-01-02 Thread Anthony Fryer
That's fixed it! All i needed to do was update my openejb-cxf version to 4.5.2-SNAPSHOT and i now see the destroy() method being called. -- View this message in context: http://openejb.979440.n4.nabble.com/openejb-not-destroying-ManagedConnections-on-shutdown-tp4658799p4660026.html Sent from

Re: How do i deploy a ManagedConnectionFactory in a war file?

2013-01-07 Thread Anthony Fryer
I initially specified the wrong link. When i edited it, it didn't resend the email. The correct link is http://java.net/projects/javaee-spec/lists/users/archive/2012-09/message/9 -- View this message in context:

Re: How do i deploy a ManagedConnectionFactory in a war file?

2013-01-08 Thread Anthony Fryer
Just thinking about the spec, i wonder if .rar files could be replaced with just a .jar file with a META-INF/ra.xml. That would make sense to me. -- View this message in context:

Does tomee plus support ValidatingManagedConnectionFactory?

2013-01-08 Thread Anthony Fryer
I'm looking at org.apache.openejb.resource.GeronimoConnectionManagerFactory and don't see any properties that control the time interval for validating connections and how many connections get validated. Is javax.resource.spi.ValidatingManagedConnectionFactory supported? -- View this message in

Re: Does tomee plus support ValidatingManagedConnectionFactory?

2013-01-09 Thread Anthony Fryer
Yes i'll definately test it. I have a question around the configuration of the pooling parameters. Now I'm deploying the ra in the war file, i was trying to use tomee.xml to configure values like poolMinSize, poolMaxSize etc. I tried variations like this... Resource id=eis/sabre/91

Re: Does tomee plus support ValidatingManagedConnectionFactory?

2013-01-10 Thread Anthony Fryer
I've done more testing and it seems that using resources.xml is not working how i thought it would. If i configure a pool in resources.xml as follows... resources Resource id=testPool class-name=com.cyberavenue.jcatest.JCATestManagedConnectionFactory poolMinSize = 7