Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14222

Re: Apache JDBC utils

From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
Newsgroups comp.lang.java.programmer
Subject Re: Apache JDBC utils
References (1 earlier) <4fa07113$0$291$14726298@news.sunsite.dk> <20%nr.17070$em4.13305@newsfe21.iad> <4fa2c587$0$292$14726298@news.sunsite.dk> <HDBor.22176$em4.504@newsfe21.iad> <4fa2f169$0$289$14726298@news.sunsite.dk>
Message-ID <AJCor.33011$kb7.29942@newsfe20.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2012-05-03 18:25 -0300

Show all headers | View raw


On 12-05-03 05:58 PM, Arne Vajhøj wrote:
> On 5/3/2012 4:11 PM, Arved Sandstrom wrote:
>> On 12-05-03 02:51 PM, Arne Vajhøj wrote:
>>> On 5/1/2012 8:14 PM, Arved Sandstrom wrote:
>>>> On 12-05-01 08:26 PM, Arne Vajhøj wrote:
[ SNIP ]

>>>>> And some of the capabilities (like caching) could become
>>>>> very handy in the future.
>>>>
>>>> The operative word being "could". Leaving aside the other management
>>>> capabilities of the persistence context Level 1 cache, like uniqueness
>>>> of identity within a PC, if you are constructing objects with a simple
>>>> mapper like DBUtils you *have* a cache. Your objects are in memory;
>>>> you're not hitting the DB every time you need them.
>>>
>>> That is not really level 1 cache.
>>
>> What do you consider to be a cache? A cache means that you've got your
>> stuff in a storage area that's faster to access than the original
>> location. Usually memory. If I get my stuff through JDBC, and access
>> data afterwards off the ResultSet, that's a cache. If I convert that
>> ResultSet to a collection of objects, and access data in that collection
>> afterwards, that's a cache.
>>
>> Insofar as this level of caching is similar to a persistence context,
>> which is referred to as Level 1 in JPA, I have no problems thinking of
>> it as Level 1 equivalent.
> 
> I would define an ORM cache as a cache in the ORM code not a cache
> in my code.
> 
> Otherwise any ORM would have a cache since the O will be in memory.

Fair enough. :-) I pretty much figured that's what you were getting at.
Still, when looking at all the cache offerings out there it's worth
recalling from time to time what they really do.

>>>> As for JPA Level 2, well, that's a decision best approached carefully
>>>> and not made available by default. I surely don't think you need to go
>>>> with JPA just in case you might need Level 2 cache at some point.
>>>
>>> If it was just that: no. But there are other features that also could
>>> become useful.
>>
>> Hopefully you know what you need early on, considering as how you did
>> good requirements analysis. In which case you're using JPA because you
>> already know you need it.
> 
> I don't think I have ever seen requirements that actually covered
> all requirements for the actual lifetime of the application.
> 
> Arne
> 
Nor have I. Although I contend that you should understand your
persistence requirements well enough to know whether JPA is called for.
In fact it's almost always a safe bet; you pretty much need some
concrete reasons *not* to use it [1]. IMO.

AHS

1. Maybe you're writing a JPA implementation, say. :-)
-- 
A fly was very close to being called a "land," cause that's what they do
half the time.
-- Mitch Hedberg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Apache JDBC utils markspace <-@.> - 2012-04-30 14:55 -0700
  Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-30 20:56 -0300
    Re: Apache JDBC utils markspace <-@.> - 2012-04-30 17:50 -0700
  Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-04-30 18:03 -0700
    Re: Apache JDBC utils markspace <-@.> - 2012-04-30 19:27 -0700
      Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 10:29 -0300
        Re: Apache JDBC utils markspace <-@.> - 2012-05-01 08:57 -0700
          Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 11:16 -0700
            Re: Apache JDBC utils markspace <-@.> - 2012-05-03 07:51 -0700
    Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-01 19:22 -0400
  Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-01 10:32 -0700
    Re: Apache JDBC utils markspace <-@.> - 2012-05-01 11:22 -0700
      Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-01 15:26 -0700
        Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 19:44 -0300
  Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-01 19:26 -0400
    Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 21:14 -0300
      Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-01 22:22 -0500
        Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:52 -0400
      Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:51 -0400
        Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-03 17:11 -0300
          Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 16:58 -0400
            Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-03 18:25 -0300
              Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 19:55 -0400
    Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-01 22:08 -0500
      Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:55 -0400
        Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-03 13:44 -0500
          Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 15:06 -0400
  Re: Apache JDBC utils "John B. Matthews" <nospam@nospam.invalid> - 2012-05-01 23:37 -0400
    Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-02 07:37 -0300
      Re: Apache JDBC utils "John B. Matthews" <nospam@nospam.invalid> - 2012-05-02 18:51 -0400
  Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-02 12:22 +0200
    Re: Apache JDBC utils markspace <-@.> - 2012-05-02 08:29 -0700
      Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-02 22:02 +0200
        Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 14:22 -0700
          Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-02 18:53 -0300
          Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:03 +0200
            Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:14 +0200
            Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:27 +0200
              Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 14:03 -0400
            Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-02 18:58 -0400
            Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 16:18 -0700
          Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-02 15:25 -0700
            Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:59 +0200
              Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 14:05 -0400
            Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 16:24 -0700
              Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-02 16:35 -0700
              Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 01:46 +0200
              Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 01:49 +0200

csiph-web