[ajug-members] App Server Context from POJO?
Martin, Robert
RMartin at fhlbatl.com
Fri Jun 2 10:32:02 EDT 2006
I've got a Runnable object that needs to hit a web service on the local
app server. I have no control over the invocation of this object, so I
cannot pass it parameters. Is there any way to get the application
context (ideally at least the server name and port number of the
application server) from inside this object? Are there any static calls
for example that can provide this information? I'm running on BEA
Weblogic 8.1.
I need to build out the URL to the web service, which will change as the
application is deployed across environments and I'd like to avoid having
to maintain this info in a database if possible.
Robert
_____
From: ajug-members-bounces at ajug.org
[mailto:ajug-members-bounces at ajug.org] On Behalf Of Bill Siggelkow
Sent: Thursday, June 01, 2006 6:04 PM
To: General AJUG membership forum (100-200 messages/month)
Subject: Re: [ajug-members] Ternary Operator - simplification or
complication?
Yep -- if I ever have a braceless "if" it's all on one line (and it's
usually just the "if" not the "else").
-Bill
On Jun 1, 2006, at 3:31 PM, John Camerin wrote:
It has its place... It depends on priorities for the code. The
ternary operator is unfamiliar to many developers. Something with more
natural language is more likely to be understood correctly by another
developer unfamiliar with the piece of code.
Number of lines of code should never come into play. Plus, the if/else
can be written on a single line:
if(n==1)b=true;else b=false;
is a perfectly valid single line of code which, consisting of multiple
statements. It means exactly the same thing as the expanded version and
the ternary operator. All different ways to write identical logic.
On 6/1/06, Rob Worsnop <rworsnop at gmail.com> wrote:
On 6/1/06, Jonathan Komorek <jonathan.komorek at benefitfocus.com> wrote:
>
>
>
> I just opened up a can of worms within our development community by
stating
> that in certain cases, I find that the Ternary Operator simplifies
code.
> I've been given the impression that I'm the last Java developer alive
that
> believes the ternary operator should ever be used. I'm interested in
hearing
> the opinions of users on this group.
>
> Has the ternary operator helped you? Caused you great grief? Should it
even
> be in the language?
>
I like it. It can be misused but so can a lot of other useful things.
--
Rob Worsnop
http://eventsbyzip.com
http://h3t.sourceforge.net
_______________________________________________
ajug-members mailing list
ajug-members at ajug.org
http://www.ajug.org/mailman/listinfo/ajug-members
_______________________________________________
ajug-members mailing list
ajug-members at ajug.org
http://www.ajug.org/mailman/listinfo/ajug-members
-----------------------------------------
This e-mail message is private and may contain confidential or
privileged information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ajug.org/pipermail/ajug-members/attachments/20060602/700fb66d/attachment.html
More information about the ajug-members
mailing list