agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] static variables
Date: Mon, 12 Mar 2007 14:52:00 -0800
Message-ID: <3fccaa690703121552n381de9c6qf922fc58face9bb5@mail.gmail.com> (raw)

I've been starting to use pljava and find it very useful, but there's
something I want to know if it's possible.  I want to have a static
variable that I can set and retrieve during a session.  Something like
this:

public static String x;
	
public static String test() {
	if (x==null) {
		return "";
	}
	return x;
}

public static String testString(String me) {
	x=me;
	return me;
}

This is a trivial example, but what I want to do on the long run is to
setup a XML parser once (per session) and to avoid the overhead for
each calling of  the function.  Is it possible?

Thanks a lot,

Andres




view thread (3+ messages)  latest in thread

Message-ID: <3fccaa690703121552n381de9c6qf922fc58face9bb5@mail.gmail.com>
Permalink:  ../3fccaa690703121552n381de9c6qf922fc58face9bb5@mail.gmail.com/
Also on:    postgresql.org/message-id/3fccaa690703121552n381de9c6qf922fc58face9bb5@mail.gmail.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] static variables
  In-Reply-To: <3fccaa690703121552n381de9c6qf922fc58face9bb5@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox