Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Uses of Application Client Project
Uses of Application Client Project [message #201667] Tue, 09 October 2007 19:54 Go to next message
Eclipse User
Originally posted by: rob.stryker.redhat.com

When creating an EJB project with WTP, you have the option of
surrounding it in an EAR and making a Client.

In the automatically created Client Project, I tried to reference some
of the classes from the EJB project, specifically the remote interface,
in order to do a JNDI lookup, gain access to the ejb, and perform some
method on it.

Eclipse marked the classes not found, so in the build path, I added the
EJB project as a dependent to the client project and was confronted with
problems in the problems view, specifically build path cycles.

I checked the build path of the EJB project, and saw *no* projects
there. I checked the build path of the EAR, but since the EAR isn't a
java project it really doesn't have a build path. Therefore the only
project with any dependency on any other project, that I could find,
would be the client depending on the ejb, as I had manually set.

So my first question is, how could there be a cycle if the only build
path dependency in the 3 projects (ear, ejb, and client) is the one that
I declared, specifically the client depending on the EJB for its remote
classes?

Secondly, why does a Client Application Project not immediately have
access to the class files of the EJB it is a client for?

Thirdly, assuming I'm completely mistaking the use of the client
application project, what is the intended usage of the client
application? Why would there ever be a dependency of the EJB upon the
client? Aren't clients supposed to connect from some client machine? Why
would an ejb ever expect to have access to the classes in a client?

Any help is appreciated

- Rob Stryker
Re: Uses of Application Client Project [message #201733 is a reply to message #201667] Wed, 10 October 2007 04:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: wknauf_NO_._INSIDE_hg-online.de

Hi Rob,

the dependency to your ejb project is not defined through the Java Build Path,
but the "J2EE module dependencies".
Open the properties of your app client project, and check your EJB jar (see this
screenshot:
http://www.informatik.fh-wiesbaden.de/~knauf/SWTVertiefungWS 2007/stateless/applicationclient2.png)

Note that a bug in WTP 2.0.1 exists which will break these dependencies on every
eclipse restart: https://bugs.eclipse.org/bugs/show_bug.cgi?id=205004
(workaround in bugreport)

Hope this helps

Wolfgang

Rob Stryker wrote:
> When creating an EJB project with WTP, you have the option of
> surrounding it in an EAR and making a Client.
>
> In the automatically created Client Project, I tried to reference some
> of the classes from the EJB project, specifically the remote interface,
> in order to do a JNDI lookup, gain access to the ejb, and perform some
> method on it.
>
> Eclipse marked the classes not found, so in the build path, I added the
> EJB project as a dependent to the client project and was confronted with
> problems in the problems view, specifically build path cycles.
>
> I checked the build path of the EJB project, and saw *no* projects
> there. I checked the build path of the EAR, but since the EAR isn't a
> java project it really doesn't have a build path. Therefore the only
> project with any dependency on any other project, that I could find,
> would be the client depending on the ejb, as I had manually set.
>
> So my first question is, how could there be a cycle if the only build
> path dependency in the 3 projects (ear, ejb, and client) is the one that
> I declared, specifically the client depending on the EJB for its remote
> classes?
>
> Secondly, why does a Client Application Project not immediately have
> access to the class files of the EJB it is a client for?
>
> Thirdly, assuming I'm completely mistaking the use of the client
> application project, what is the intended usage of the client
> application? Why would there ever be a dependency of the EJB upon the
> client? Aren't clients supposed to connect from some client machine? Why
> would an ejb ever expect to have access to the classes in a client?
>
> Any help is appreciated
>
> - Rob Stryker
Re: Uses of Application Client Project [message #201749 is a reply to message #201733] Wed, 10 October 2007 17:13 Go to previous messageGo to next message
Eclipse User
Originally posted by: rob.stryker.redhat.com

Wolfgang:

Thanks for the response. The classpath issue / dependent modules
wasn't exactly what I was complaining about. My issue is whether or not
a client project is meant to be deployed or not. What is the *use case*
of an application client project?

To be more specific, we have a user wondering why his client project was
not deployed to the server when using our (custom) server adapter. The
first thing I did was to take his projects into my workspace and test
with the default WTP-provided generic server adapter (jboss) and see if
the client was deployed / published there.

It was not.

This makes me wonder whether a WTP Application Client Project is *meant*
to be deployed at all. If it is not, why not? If it is, why isn't it
being deployed with the WTP-provided jboss server adapter?

Thanks to all who can / may help;

- Rob Stryker


Wolfgang Knauf wrote:
> Hi Rob,
>
> the dependency to your ejb project is not defined through the Java Build
> Path, but the "J2EE module dependencies".
> Open the properties of your app client project, and check your EJB jar
> (see this screenshot:
> http://www.informatik.fh-wiesbaden.de/~knauf/SWTVertiefungWS 2007/stateless/applicationclient2.png)
>
>
> Note that a bug in WTP 2.0.1 exists which will break these dependencies
> on every eclipse restart:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=205004 (workaround in
> bugreport)
>
> Hope this helps
>
> Wolfgang
>
> Rob Stryker wrote:
>> When creating an EJB project with WTP, you have the option of
>> surrounding it in an EAR and making a Client.
>>
>> In the automatically created Client Project, I tried to reference some
>> of the classes from the EJB project, specifically the remote
>> interface, in order to do a JNDI lookup, gain access to the ejb, and
>> perform some method on it.
>>
>> Eclipse marked the classes not found, so in the build path, I added
>> the EJB project as a dependent to the client project and was
>> confronted with problems in the problems view, specifically build path
>> cycles.
>>
>> I checked the build path of the EJB project, and saw *no* projects
>> there. I checked the build path of the EAR, but since the EAR isn't a
>> java project it really doesn't have a build path. Therefore the only
>> project with any dependency on any other project, that I could find,
>> would be the client depending on the ejb, as I had manually set.
>>
>> So my first question is, how could there be a cycle if the only build
>> path dependency in the 3 projects (ear, ejb, and client) is the one
>> that I declared, specifically the client depending on the EJB for its
>> remote classes?
>>
>> Secondly, why does a Client Application Project not immediately have
>> access to the class files of the EJB it is a client for?
>>
>> Thirdly, assuming I'm completely mistaking the use of the client
>> application project, what is the intended usage of the client
>> application? Why would there ever be a dependency of the EJB upon the
>> client? Aren't clients supposed to connect from some client machine?
>> Why would an ejb ever expect to have access to the classes in a client?
>>
>> Any help is appreciated
>>
>> - Rob Stryker
Re: Uses of Application Client Project [message #201822 is a reply to message #201749] Thu, 11 October 2007 07:19 Go to previous message
Eclipse User
Originally posted by: wknauf_NO_._INSIDE_hg-online.de

Hi Rob,

The application client project IS deployed with the WTP JBoss server adapter.
The app client JAR is included in the EAR file.
You even have to deploy it to the server so that the client ENC for the app
client can be initialized.

If it is not deployed, there could be an error in the project structure. Is your
app client project part of an EAR application ?

Best regards

Wolfgang Knauf

>
> This makes me wonder whether a WTP Application Client Project is *meant*
> to be deployed at all. If it is not, why not? If it is, why isn't it
> being deployed with the WTP-provided jboss server adapter?
>
> Thanks to all who can / may help;
>
> - Rob Stryker
>
>
Previous Topic:Eclipse ATF new name - vote here : http://www.surveymonkey.com/s.aspx?sm=xpcUsNQpBZ5J3a70bXHzyw_3d_3
Next Topic:J2EE Module Spendencies
Goto Forum:
  


Current Time: Wed Jul 30 13:12:17 EDT 2014

Powered by FUDForum. Page generated in 0.09410 seconds