[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2009-04-04 Thread henk53
ALRubinger wrote : Jaikiran, you give a good example of why the spec dictates the fields must be injected into static members. But it's OK to criticize something for being stupid. | | bcn wrote : In real-world application that would make it almost useless. | | Yep. | | Imagine if

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2009-03-18 Thread Wolfgang Knauf
Hi, I think you are basically right. But the server needs some parts of the application client module to prepare the Environment Naming Context (for JNDI lookups or for injection preparation), so it would be quite hard to build different jars for the server side of the client and the client

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2009-03-17 Thread xmedeko
Hi, I am a beginner with JEE. I don't understand, why examples here http://www.jboss.org/community/docs/DOC-12835 have a class with main method in the EAR file. As I understand, the EAR is deployed on the server, but one usually need to deploy clinets on the other machines. Also, the client

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2009-02-12 Thread bcn
For those interested: I tried it and it works perfectly in the described way on the same host. Next step was to try it from a remote computer, as an application client usually is not installed on the server. So I copied all jars and replaced the jndi IP, but I got: | 2009-02-12 10:51:35,821

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-12-28 Thread skajotde
I think JBoss try resolve speces issues, like here https://jira.jboss.org/jira/browse/JBAS-5796. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4198521#4198521 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4198521

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-12-21 Thread jaikiran
What exactly is not working? You will have to provide us more details about what you are doing and what is the issue. I know there is a very minor change that i have to do that wiki, related to classpath, for JBoss-5.0 GA. However that change, as far as i know, should not stop it from working.

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-12-21 Thread Sanjuro
I found the problem: Stateless.ear is working perfectly, however only if you JBOSS_HOME does not contain any spaces on Windows. Haven't figured out why yet. Everything else seems to work just fine with spaces in the path. View the original post :

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-12-21 Thread jaikiran
Sanjuro wrote : however only if you JBOSS_HOME does not contain any spaces on Windows. | | It is always recommeded not to install JBoss (or even Java) in a folder contain a space in the path name. You sometimes run into very weird issues when you install in such folders. View the

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-12-20 Thread Sanjuro
I'm trying this example as documented on the http://www.jboss.org/community/docs/DOC-12835 on JBoss 5.0.0.GA. However I can not get it to work. Is the Wiki entry no longer up-to-date? Or is something wrong with my configuration? View the original post :

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-24 Thread bcn
Hello, two more questions: 1. Can you really use the EJB annotation only in the main class (and only for static fields)? In real-world application that would make it almost useless. 2. Can you use in the same way a stateful session bean? E. g. to handle the client authentication and session.

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-24 Thread jaikiran
bcn wrote : | 1. Can you really use the EJB annotation only in the main class (and only for static fields)? | That's what the spec says. bcn wrote : | In real-world application that would make it almost useless. | | Why do you think so? From what i understand, they do have a

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-24 Thread Wolfgang Knauf
In addition: spec chapter 9.4 says this: anonymous wrote : Injection is also supported for the application client main class. Because the application client container does not create instances of the application client main class, but merely loads the class and invokes the static main method,

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-24 Thread bcn
Thank you both for the answers. So stateful beans should work, okay, great. I understand that the field with the EJB annotation unfortunately has to be static. That could make it harder to use the same code in an app client and in an J2EE server. Okay, maybe you can use always static fields.

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-24 Thread Wolfgang Knauf
Carefully read the spec: supported for the application client main class ;-). If you declare your injected EJBs as public static variables in the main class, you can access them from anywhere inside your client app. Best regards Wolfgang View the original post :

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-24 Thread ALRubinger
Jaikiran, you give a good example of why the spec dictates the fields must be injected into static members. But it's OK to criticize something for being stupid. bcn wrote : In real-world application that would make it almost useless. Yep. Imagine if MC or Spring or any injection container

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-21 Thread Wolfgang Knauf
Updated your wiki entry with a properly named EAR file without web client and updated the doc to reflect those changes. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4183631#4183631 Reply to the post :

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-20 Thread Wolfgang Knauf
Whow, great! Thanks a lot! As this sample is required for an EJB course at the University of Applied Science in Wiesbaden, Germany, your knowledge will be spread to a group of 15 students on thursday. Your help was just in time ;-). I will update my sample (with proper EAR name and maybe code

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-19 Thread jaikiran
jaikiran wrote : Maybe i will get some time during this weekend. | | Got it working. Have created a wiki with the details about how to use the application client container https://www.jboss.org/community/docs/DOC-12835. P.S: I took the liberty of attaching your sample application to that

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-16 Thread jaikiran
I haven't yet got a chance to give this a try. Maybe i will get some time during this weekend. Wolfgang Knauf wrote : Any further ideas? There's a test case in the JBoss AS trunk, which you could have a look at

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-14 Thread jaikiran
I haven't tried this on my local setup. Let me give it a try and see how it goes. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4182174#4182174 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4182174

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-13 Thread jaikiran
As far as i know, you have to have the application-client.xml in your appclient (StatelessClient.jar) for it to be recognized as a appclient. When you introduce the appication-client.xml and the jboss-client.xml, you will see this in the logs: 15:04:10,279 INFO [ClientENCInjectionContainer]

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-13 Thread Wolfgang Knauf
I tried to start the app through the AppClientMain with this commandline (unzipped client and ejb jar from sample EAR), but it did not help: java -cp C:\temp\jboss-5.0.0.CR2\client\jbossall-client.jar;StatelessEJB.jar;StatelessClient.jar org.jboss.client.AppClientMain -jbossclient

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-12 Thread Wolfgang Knauf
I placed a sample at http://www.informatik.fh-wiesbaden.de/~knauf/private/Stateless_BrokenAppClient.ear (created with Eclipse/WTP and includes sources). Hopefully, someone can take a look at it and tell me whats wrong. The app client is this: public class GeometricModelApplicationClient | {

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-09 Thread Wolfgang Knauf
This resulted in JBoss exceptions on deploy. I will try to create a full (broken) sample in the next few days. Best regards Wolfgang View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4181164#4181164 Reply to the post :

[jboss-user] [EJB 3.0] - Re: @EJB injection in JBoss 5 application clients?

2008-10-07 Thread Juergen.Zimmermann
IMHO, the @EJB annotation should only be supported for static members in classes with a main() function [see the spec for EJB 3 and the app client container] View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4180898#4180898 Reply to the post :