It is better to use some "native" API like "COPY" for long running import,
some RDBM's support imports without constaint
checks, SQL parsing , and sometimes "long running import" becomes very
"short".
- Original Message -
From: "Christoph Sturm" <[EMAIL PROTECTED]>
To: "Gavin King"
> The stuff you mention sounds cool, and I already thought about that, but
to
> my knowledge there's no java api that supports stuff like that. If you
know
> a api that supports such functionality, please tell me, that would be
really
> great!
>
> regards
> chris
>
Try DBCPConnectionProvider.
- Original Message -
From: "Jim Downing" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 10:24 PM
Subject: [Hibernate] Postgres problem - idle in transaction.
> Hi all,
>
> I have a problem with hibernate and postgresql that I suspe
Your need to extend cirrus.hibernate.impl.SessionFactoryImpl to solve this
problem, class generated by cglib extends
op.model.OPShippingMarks, try something like this:
public ClassPersister getPersister(Class theClass) throws MappingException
{
try{
return super.getPersister( theClass);
I have converted code to use BitSet , but see no better performance (not
trivial to test).
BitSet creates "small" arrays It is important for some JVM implemetations
(not trivial to handle memory fragmentation),
but possible optimizes nothing on current implementations.
possible there is no optimiz
MetaClass implementation is deefined in the same package, but it is no test
for package methods.
> Very, very cool
>
> One more request: is it possible to support this for package-visibility
> methods by generating the MetaClass in the same package? (Might have to
> have a different instance
Yes, I forgot this DBCP "feature", validation query has no effect if
"testOnReturn" or "testOnBorrow" is not set.
"testOnReturn" is not very meaningfull, but you must set "testOnReturn" to
true if "validationQuery" is set.
> As a follow-up to my last message, DBCP still times out,
> even with th
Is it possible to use some "custom" format for mapping without
transformations to XML ?
I want to implement some experimental definition language and use it with
hibernate, but
can't find ways to plug mapping layer without code modifications.
---
; So just let me know when you have something reasonably final.
>
> Thanks :)
>
> - Original Message -
> From: "Juozas Baliuka" <[EMAIL PROTECTED]>
> To: "Schnitzer, Jeff" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: <[EMAI
> I'm curious how feasible it would be to write a Java-based evaluator of
> Hibernate queries, or at least leverage the existing parser code to gain
> access to the abstract syntax tree.
>
> One possibility is that certain subsets of queries (most filters, I
> think) could be run within the JVM, s
postgres closes connection if it detects error in protocol, something like
this can produce this error:
char c = '\u';
String query = "select " + c;
statement.execute(query);// error not detected by driver, server closes
connection;
I am not sure about all driver versions, but it must be possib
rect delegation to "super"
(
this.method()->MethodProxy.invokeSuper(this)->this.CGLIB$ACCESS_x_method()->
super.method() )
"invoke" - direct delegation to "delegate"
( this.method()->MethodProxy.invoke(param)->param.method() )
I see we will have nice
Hi,
this feature was sugested on forum.
I do not want to send my hibernate.properties, it is modified . Is it
possible to remove hibernate.properties file from cvs and add
hibernate.properties.sample ? (I need to modify this file every time I
update)
#hibernate.dbcp.validationQuery "SELECT 1 FRO
I am not sure, but I think it is no way good way to persist proxies at this
time. It is possible to register custom persister for class,
but hibernate will not find it by generated name, you need to implement
SessionFactory.getPersister to find persister.
- Original Message -
From: "Gordon
Hi,
I see TypFactory, ClassPersister and all implementations use arrays of ints
to store flags, It is not very performant
and adds some grabage to code. java.util.BitSet is implemented for this use
case (it is possible to implement something faster for this use case too).
Can I break interfaces,
Hi,
I found this in archyve. It is bug in cglib, updated rc2 has fix for
"writeReplace", but it has bug
in "MyClass.class" implementation, it dublicates "findClass(String name)",
Class init hasbug too, it fails if argument count > 6 in method
"myMethod(int arg1,int arg2,int arg3,int arg4,int arg5,i
> I don't close the session at all in any of my business logic methods. In
> deployment, a servlet filter _always_ closes the session at the end of the
It looks like not the good way for performance. As I understand
"doFilter()" returns after output is sent and
connection is open/locked too lo
Is Reflect helper used to load classes ?
It can be a problem on some app servers :
public static Class classForName(String name) throws ClassNotFoundException
{
try {
return Thread.currentThread().getContextClassLoader().loadClass(name);
}
catch (Exception e) {
return Class.forName(n
It can be a problem in "transient state":
Parent p = new Parent();
Child c = new Child();
c.setParent(p);
assertTrue("parent must have a child", p.getChildren() != 0 );
there are two possible solutions :
1) implement "void setParent(Parent p){ this.p = p;
p.getChildren().add(this); }
Try to upgrade Ant or use "forke" to execute tests outside Ant JVM, xml
parser loaded by Ant conflicts with hibernate.
> Just found this entry in the FAQ about junit, will give that a try first.
> Sorry for bugging the list. (Although it would be nice to know the jars
and
> versions that are nec
Hi,
I have problems with postgresql <= 7.2 and "large" tables.
PostgreSQL server uses "typed" indexes, if indexed field and constant is not
the same type, index is not used.
Driver sends long constant as int ( it must cast it to int8 or convert to
string )
test=# \timing
Timing is on.
test=# select
tPropertyList(int index) and setPropertyList(int index,
> ArrayList).
>
> The the convert method below dies and doesn't work:
>
> BeanUtils.copyProperties(cmcfForm, c);
>
> returns null for my Lists on my object??
>
> Any ideas?
>
> -Original Message-
>
This use case like
> obj.setY(2);
> obj.setZ(3);
> foo.flush(obj);
looks like object database. I think it is good idea to implement some simple
framework/Hibernate server mode.
I prefer language neutral and pluggable RPC, some of my client side
applications are native windows applicati
I see, TreadLocal stuff becomes popular and I think it can be implemented in
SessionFactory.currentSession();
Session can be mapped to Thread in "standalone" mode and to JTA Transaction
in "managed" mode (Transaction is mapped to Thread in JTA too).
Factory implementation opens it once per transac
equals() and hashCode() can be implemented using this definition :
for all persistent objects a, b :
a.equals(a) === true
a.equals(b) ==> b.equals(a)
a.equals(b) ==> a.hashCode() = b.hashCode()
a is persistent ==> a.getId() != null
a.equals(b)
It was idea in cglib to implement true "DynaBean", but I can not find use
case for this stuff (possible as workaround for some
Bean, but not Map enabled scripting languages).
As I understand "DynaBean" form [beanutils] is some kind of adapter for map,
why do not
to use "normal" Map directly ?
>
This public method implemented for *all* proxy instances.
Proxy implements net.sf.cglib.Factory interface it is used for optimization
to eleminate reflection.
We can rename getters and setters, but it is public API and you can filter
methods this way:
public boolean accept(){
return net.sf.cglib
Hi, Iam afraid security stuff is undocumented but try this:
grant permissions in policy configuration, I see hibernate doe's not have
permissions to read system properties:
>at
java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1259)
> at java.lang.System.getProperties(Sys
Hi,
It is about possible memory leak.
public PreparedStatement prepareQueryStatement(String sql, boolean
scrollable) throws SQLException, HibernateException {
...
statementsToClose.add(ps); // strong reference on statement
return ps;
}
//-
I have removed my code with BitSets, this code is more readable, but it
changes public API too mutch.
> > BitSet creates "small" arrays It is important for some JVM
> > implemetations (not trivial to handle memory fragmentation),
> > but possible optimizes nothing on current implementations.
>
>
see http://www.enterpriseobjectbroker.org/, I think it must be interesting
for you.
> I'm wondering how many people would like to access persistent objects from
a
> remote client
> directly. I guess most people use servlets/JSP, in which case they don't
> care about remote
> accessibility.
>
> Loo
try this :
public Object convert(Class type, Object value) {
if (log.isDebugEnabled()) {
log.debug("entering 'convert' method");
}
// for a null value, return null
if (value == null) {
return null;
}else if ( value.getClass().isAssignableFrom(type) ){
jars from http://www.ibiblio.org/maven/cglib/jars/ are without dependancies,
you need BCEL or ASM as dependancy .
bcel
5.0
You can download cglib-asm-1.0.jar and use it in single jar too ( ASM is
"faster" ).
- Original Message -
From: "Jim Downing" <[EMAI
Why do you need pooling if connections are time out. Close connection after
transaction and open a new one before transaction without any kind of
pooling. It must be very trivial to implement this kind of DataSource, a few
lines of code.
>
> Ok, I am trying to get DBCP connection pooling working
> contradictory information about how to do this.
>
>
> thanks,
>
> -dave
>
>
>
>
> Juozas Baliuka wrote:
> > Why do you need pooling if connections are time out. Close connection
after
> > transaction and open a new one before transaction without any kind
Dissable batch updates, there is no batch updates in server protocol, driver
just emulates this feature and it will not increase
performance on postgresql at this time.
> I think it is a bug in the Postgres implementation of JDBC batch updates.
>
> Gerry Duprey wrote:
>
> > Howdy,
> >
> > I'm n
I am not sure it can help for you, but sometimes I use this for "readonly"
data :
transform tables like "TBL_CITY" or "TBL_COUNTRY" to "properties" file and
store this data on client side.
> Using Hibernate 2.0.3
>
> We have a table "panel_demographics" (xml at bottom) which holds foreign
> ke
Have you tried to commit transaction ?
- Original Message -
From: "Prasad Iyer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 17, 2003 1:34 PM
Subject: [Hibernate] Problem
Hi,
I am using Microsoft SQL Server as a database and Hibernate version 2.0.5
beta. We are
using Hibernate 2.0 beta 5
>
> - Original Message -
> From: "Juozas Baliuka" <[EMAIL PROTECTED]>
> To: "Prasad Iyer" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, September 17, 2003 9:13 PM
> Subject: Re: [Hiberna
It has meaning for trivial methods "getters/setters" or "empty" constuctors.
I am not sure, but looks like Sun JDK 1.4.1_02 generates code to optimize
native method invokation too.
- Original Message -
From: "Bill Burke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 2
It is possible to find problem outside generated code for optimization:
setValues(bean,values);
}catch( NullPointerException npe){
for( int i = 0; i < propertyCount; i++ ){
if( types[i].isPrimityve() && values[i] == null ){
throw new NullPointerException( "can not set null for
Yes, it is problem in SessionHolder implementation, but it is trivial to
fix:
>
> 01:public class SessionHolder
> 02:{
> 03: private static final boolean DEBUG = true;
> 04: private static ThreadLocal session;
> 05:
> 06: public static Session getSession()
> 07: {
> 08:SessionHolder.conne
It must be bug in "SessionHolder".
- Original Message -
From: "Gavin King" <[EMAIL PROTECTED]>
To: "William R. Lorenz" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Saturday, September 27, 2003 1:48 PM
Subject: Re: [Hibernate] Hibernate Bug? [ConcurrentModificatio
ate initializes.
Looks like "debugLocaton" was dropped in cglib 1.0, it is possible to modify
cglib or to remove optimizer, but it must be more trivial to dissable it (It
is not very "drammatic" optimization).
>
> -Original Message-
> From: Juozas Baliuka [m
There is system property in cglib "cglib.debugLocation" , if you will set it
cglib will dump classes to this directory, but you will need to modify
hibernate or cglib factories to use "Class.forName".
- Original Message -
From: "Mao, Dean (IHG)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
cglib-1.0 "detects" BCEL or ASM using "Class.forName" and BCEL has priority.
BCEL will be dropped in the next cglib releases and it will depend on ASM
only.
> Hi all,
>
> I saw some posts that suggested that instead of using BCEL and cglib, I
> should use cglib-asm, which is a custom version of c
It must possible to map procedure this way :
CREATE VIEW MyView AS ( ... call your procedures ... )
- Original Message -
From: "bertrand lancelot" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 10, 2003 3:22 PM
Subject: [Hibernate] stored procedure and Hibernate ?
All of databases I have used have something like "LOAD, COPY ..." or stored
procedures/API to import text files.
Looks like it was C++ API in DB2 for import a few years ago, but I think you
will find something more simple at this time, try to find some predefined
stored procedure in documentation.
>
> Ah. hm. I am actually ready to release 2.1rc1. Just waiting on
> Bela's stuff.
>
> Exactly how beta is "beta"?
We are going to change package name, but I do not think we will change
something
not trivial.
>
> >Gavin, with the API changes it's probably quickest if I put a patch
> >toget
- Original Message -
From: "Adam Megacz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 12:40 PM
Subject: [Hibernate] net.sf.dialect.BerkeleyDB: Hibernate without SQL?
>
> I've always felt that SQL is a poor match for object persistence;
> something of an un
Fork and modify this class
http://cvs.sourceforge.net/viewcvs.py/voruta/voruta/src/java/net/sf/voruta/S
oftRefMemoryCache.java
It is simple soft cache implementation and emulates LRU.
BTW: Suns JVM SoftReference implements LRU algorythm itself .
- Original Message -
From: "Greg Luck" <
You can do it in hebernate without JDBC.
Implement stored procedure and use it this way:
CREATE FUNCTION myProc() RETURNS INT .
CREATE VIEW My_Update( ID, update_count ) as SELECT 'myConstant' ,
myProc();
Map this view to readonly object.
- Original Message -
From: "Vivian Fon
http://www.p6spy.com/
Try to query system views for statistics, it must help for performance
tuning too.
- Original Message -
From: "Eric Pugh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 24, 2003 11:30 AM
Subject: [Hibernate] Query Counter Interceptor?
> Hi all,
- Original Message -
From: "Adam Megacz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 4:46 AM
Subject: [Hibernate] in-memory databases vs query-in-memory databases
>
> Okay, this isn't 100% hibernate-related, but I figure you guys think a
> lot about stuf
re orders in stock exhange ).
If you are talking about applications like "Web blog", Prevayler must be a
good choise.
>
> "Juozas Baliuka" <[EMAIL PROTECTED]> writes:
> > Databases lock updated and deleted rows only and transaction blocks
> > on conf
- Original Message -
From: "Adam Megacz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 29, 2003 3:04 AM
Subject: Re: [Hibernate] in-memory databases vs query-in-memory databases
>
> "Juozas Baliuka" <[EMAIL PROTECTED]
Maven is a good idea, but not a good as implementation.
It is very good for generated reports in undocumented projects like cglib :)
I can understand it, Maven depends almost on evrything you can find on inet
and it is very hard to
release product with this count of dependancies.
It took a lot of
57 matches
Mail list logo