Re: [JBoss-user] Re: From WebLogic to JBoss

2003-01-24 Thread Joey Gibson
--- Rob Moore <[EMAIL PROTECTED]> wrote:
> See http://www.jboss.org/services/bea-port.jsp

It currently only support WLS 6.1. I wonder when it
might support 7.0. That would really be useful to me.


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] best practice - selecting a finder based on search criteria VO

2003-01-17 Thread Joey Gibson
On Fri, 17 Jan 2003 12:27:02 +, Jim Clayson <[EMAIL PROTECTED]>
wrote:

||| searchCriteriaVO has
||| engineType (all,1, 2 ,3)
||| condition (any,good, fair, poor)
||| registrationFromDate (could be null)
||| registrationToDate(could be null)
||| 
||| The above criteria could produce a fairly large number of unique 
||| combinations and thus that same number of finders.

I'm in the same boat, and whether or not this is a 'best practice' I
couldn't say, but I'll show you what I've written and you can decide. We
have a search page that has 5 criteria, one of which is always required.
The other four can be there or not, all, some or none. We end up with 16
finders then. You are correct about building up a dynamic SQL query being
rather an easy thing to do, but generating the finder names is a bit more
work. Here's what I did. I'll just dump the code and then discuss
afterwards.

public Collection generateFinderAndCall(EJBLocalHome home,
String 
providerId,

ClaimSearchAttributes attrs)
{
long start = System.currentTimeMillis();

Collection list = null;
StringBuffer name = new StringBuffer("findByProviderId");
List args = new ArrayList();

args.add(providerId);

if (attrs.getMemberId() != null)
{
name.append("MemberId");
args.add(attrs.getMemberId());
}

if (attrs.getTcn() != null)
{
name.append("Tcn");
args.add(new BigDecimal(attrs.getTcn()));
}

if (attrs.getFromDate() != null)
{
name.append("FromDate");
args.add(attrs.getFromDate());
}

if (attrs.getThroughDate() != null)
{
name.append("ThroughDate");
args.add(attrs.getThroughDate());
}

String methodName = name.toString();
List classes = new ArrayList();

for (Iterator i = args.iterator(); i.hasNext(); )
{
classes.add(i.next().getClass());
}

try
{
Method method = home.getClass().getMethod(methodName, (Class[])
classes.toArray(new Class[classes.size()]));

list = (Collection) method.invoke(home, args.toArray());
}
catch (Exception e)
{
LOG.error("error getting/calling finder", e);
list = new ArrayList();
}

return list;
}

This builds up the name of the finder by appending each piece if the VO's
getter for that attribute doesn't return null. The names of the finders are
generated in order so that this regardless of what criteria are passed in,
a proper finder name will be generated. Each argument is added to a
collection, which is then walked to get the class of each argument. This is
converted into a Class[] so we can pass it to Class#getMethod to get the
desired method directly off the Home interface rather than having to do
Class#getMethods and loop over them until we find the right finder. Once
the method is in hand we execute it on the home, passing in the collection
of arguments, casting the result to Collection and then returning that or
an empty collection if it fails. 

This does work (I just tested it), I'm just not sure of the performance
implications of using reflection in this case.

Joey


--
http://www.joeygibson.com




---
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache 
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Announcement - JBoss Handbook

2003-01-03 Thread Joey Gibson
On Fri, 2003-01-03 at 16:48, Meeraj Kunnumpurath wrote:

> I am pleased to announce the availability of the book "JBoss 3.0
> Deployment and Administration Handbook". The book provides a
> comprehensive coverage of the JBoss 3.0 server, focusing on 

Is this the same book that comes in the electronic subscription or is
this a different book? If it is in the subscription, how do we upgrade?





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: Re[4]: [JBoss-user] Optimistic locking ported to JBoss-3.2

2002-12-26 Thread Joey Gibson
On Thu, 26 Dec 2002 20:42:56 +0200, Alex Loubyansky <[EMAIL PROTECTED]>
wrote:

||| Well, I'll try to explain.
||| Suppose, we use version column strategy, i.e. counter column that will
||| be increased by 1 after each update.

Floyd Marinescu has a good explanation of this pattern in his book EJB
Design Patterns. It's the section called Version Number. He only touches on
how to use it with entities, but the general principles should be a good
enough explanation.

Joey


--
http://www.joeygibson.com




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] jmx-console

2002-12-19 Thread Joey Gibson
On Wed, 18 Dec 2002 15:28:53 -0600, "Callies, Peter"
<[EMAIL PROTECTED]> wrote:

||| Plus you'll need the JDK, not just the JRE.

Exactly. If you are on a Windows box and don't set JAVA_HOME to explicity
point to your JDK directory, you'll be using java.exe from \Winnt\System32,
which is a JRE version and so won't have access to tools.jar. Just set
JAVA_HOME=c:\ and you should be set.




---
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now!  Before the Holidays pass you by.
T H I N K G E E K . C O M  http://www.thinkgeek.com/sf/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user