Hi,

 Class.forName(Column.class.getName()) == Column.class

if you know what i mean. The JVM could not be THAT lazy. If you refer
to a class, it must load it.

regards,

Manfred


2011/11/8 Lukas Eder <[email protected]>:
> Hello Sergey,
>
>> 1. There is a method Record.into that copies values from Record to the
>> another bean with the same properties. But I  have not found reverse
>> operation ("copyFrom") in the Record. Does it have sense? Or better to use
>> something like BeanUtils.copyProperties?
>
> That's a very nice idea. I filed this as feature request #912:
> https://sourceforge.net/apps/trac/jooq/ticket/912
>
>> 2. I am not sure that JooqUtil.isJPAAvailable works correctly, because
>> Column class is in the import and we can not load class JooqUtil without
>> Column (we will have ClassNotFound exception, at least in OSGI container).
>> If we want to check availability of column class we have remove binary
>> dependency and replace
>> Class.forName(Column.class.getName());
>> with
>> Class.forName("javax.persistence.Column");
>> and move all javax.persistence - dependent operations to a separate class.
>
> Hmm, I wasn't aware of that. I thought classes were loaded lazily by
> class loaders? But then, the same applies to JooqLogger (log4j,
> slf4j), and OracleUtils (ojdbc), right? There are binary dependencies
> in those classes as well.
>
> I find the Java reflection API clumsy enough already. If I have to
> operate on annotations using reflection, that code tends to become
> quite verbose. What is the OSGI way of creating "light" dependencies?
> Is there no "middle way"?
>
> By the way: Do you have some pointers for me (links, tutorials) to set
> up an OSGI-enabled environment? If I'm going to support that, I need
> to do some integration testing.
>
>> 3. I see no reason to use maven-bundle-plugin (OSGI - related) in modules
>> jOOQ-codegen and jOOQ-codegen-maven at this moment, only in jOOQ and
>> jOOQ-spring
>
> Can you explain, please? I've been oblivious to OSGI so far.
>
>> 4. I am trying to synchronize with source control repository and have the
>> following compilation error:
>>
>> [INFO] Compilation failure
>> \projects\jooq\jOOQ\src\main\java\org\jooq\impl\InsertImpl.java:[130,25]
>> reference to addValue is ambiguous, both method
>> <T>addValue(org.jooq.Field<T>,T) in org.jooq.StoreQuery<R> and method
>> <T>addValue(org.jooq.Field<T>,org.jooq.Field<T>) in org.jooq.StoreQuery<R>
>> match
>
> Thanks for reporting this. I keep running into these sorts of
> compilation errors due to a bug either in javac or in the Eclipse
> compiler. The Eclipse compiler is known to be quite different and more
> lenient in the way it handles generics in overloaded methods. I'll fix
> this ASAP
>
>> Do you known how to fix it?
>
> I hope I don't have to change the API. You could try playing around
> with the casts applied to line 130 of InsertImpl.
>
> Cheers
> Lukas
>
> 2011/11/8 Sergey Epik <[email protected]>:
>> Hi Lukas,
>>
>> I am very happy to use jOOQ and have some questions/issues:
>>
>> 1. There is a method Record.into that copies values from Record to the
>> another bean with the same properties. But I  have not found reverse
>> operation ("copyFrom") in the Record. Does it have sense? Or better to use
>> something like BeanUtils.copyProperties?
>>
>> 2. I am not sure that JooqUtil.isJPAAvailable works correctly, because
>> Column class is in the import and we can not load class JooqUtil without
>> Column (we will have ClassNotFound exception, at least in OSGI container).
>> If we want to check availability of column class we have remove binary
>> dependency and replace
>> Class.forName(Column.class.getName());
>> with
>> Class.forName("javax.persistence.Column");
>> and move all javax.persistence - dependent operations to a separate class.
>>
>> 3. I see no reason to use maven-bundle-plugin (OSGI - related) in modules
>> jOOQ-codegen and jOOQ-codegen-maven at this moment, only in jOOQ and
>> jOOQ-spring
>>
>> 4. I am trying to synchronize with source control repository and have the
>> following compilation error:
>>
>> [INFO] Compilation failure
>> \projects\jooq\jOOQ\src\main\java\org\jooq\impl\InsertImpl.java:[130,25]
>> reference to addValue is ambiguous, both method
>> <T>addValue(org.jooq.Field<T>,T) in org.jooq.StoreQuery<R> and method
>> <T>addValue(org.jooq.Field<T>,org.jooq.Field<T>) in org.jooq.StoreQuery<R>
>> match
>>
>> Do you known how to fix it?
>>
>> --
>> Best regards, Sergey
>>
>

Reply via email to