Same EE/JPA project - Multiple Appservers [message #227583] |
Tue, 10 February 2009 19:00 |
Eclipse User |
|
|
|
Originally posted by: natgross.ATgmail.com
In 3.4 wtp, I have EE/JPA projects that I would like to deploy to
multiple appservers, AND run them from a fat (non web) client.
The question on the server project is: Which server-runtime library do I
use?
And on the client project, in the same source, I do a different init of
the Context (and jndi lookup) based on user's choice of server to connect
to. (Basically we want to test our server app on many servers from the
same client.) Is it ok to include all server vendors' client libs in the
same project?
Thanks nat
|
|
|
|
Re: Same EE/JPA project - Multiple Appservers [message #227611 is a reply to message #227599] |
Tue, 10 February 2009 22:09 |
Eclipse User |
|
|
|
Originally posted by: natgross.ATgmail.com
On Tue, 10 Feb 2009 20:43:29 +0000, Konstantin Komissarchik wrote:
>> Is it ok to include all server vendors' client libs in the same
>> project?
>
> I would definitely not do this for either the server or the client part
> of your app. If you want to write portable code, you will need to get a
> hold of standard Java EE spec interfaces from Sun. Then you want to
> setup a server runtime definition around those libraries. You do this by
> selecting Basic/J2EE Runtime Library option in the new server runtime
> wizard. After that, go ahead and define runtimes for other servers that
> you want to support as well. In your projects, go to project properties
> and find the Targeted Runtimes page. Select the spec runtime and all the
> other server runtimes. Make sure to make the spec runtime the primary
> runtime (there is a little target decoration icon that shows which
> runtime is the primary). The primary runtime controls the libraries that
> your project sees, while the functionality that's available for use on
> the project (as manifested by facets) is going to be constrained as an
> intersection of capabilities of all the runtimes that you select. This
> is the recommended way to configure your projects if you intend to
> develop cross-platform applications.
Sounds simple enough on the server side. Thanks.
Question: Can I just define the basic/j2ee runtime (hopefully it's also
JEE 5) and not the other server's runtime and still deploy to multiple
servers?
|
|
|
Re: Same EE/JPA project - Multiple Appservers [message #227618 is a reply to message #227599] |
Tue, 10 February 2009 22:28 |
Eclipse User |
|
|
|
Originally posted by: natgross.ATgmail.com
Woops. I just tried adding a ejb 3.0 project to the basic runtime and it
told me that it does not support it. But I think that I should not have a
problem using any runtime that I want to use as a defacto (maybe
Glassfish or Geronimo) standard.
In other words, now that I know that I can specify a primary runtime, and
the project sees only that, I need not worry even if I deploy that
project to multiple servers.
Thanks,
nat
|
|
|
|
Re: Same EE/JPA project - Multiple Appservers [message #227630 is a reply to message #227625] |
Wed, 11 February 2009 00:06 |
Eclipse User |
|
|
|
Originally posted by: natgross.ATgmail.com
On Wed, 11 Feb 2009 00:02:33 +0000, Konstantin Komissarchik wrote:
>> Question: Can I just define the basic/j2ee runtime (hopefully it's also
>> JEE 5) and not the other server's runtime and still deploy to multiple
>> servers?
>
> Yeah, that will work as well, ...
This is great! I am not worried about the checks, because in reality you
don't know if it works until actually running it anyhow.
Thanks.
nat
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04643 seconds