Hello!!
I have a problem witth retrieve two classes in a two tables.
Classes: A and B. B estends A.
When I have one class (example: A) I see if Id (getId()) is null. If its true, I do
select MAX and I assing to class (setId()). This work ok, always.
In the new case (A and B), when I retrieve
Hi,
auto-retrieve does not require auto-increment to be set.
You likely made a misstake in your class-definitions and or repository
declarations.
Stefan
Carles Duque wrote:
Hello!!
I have a problem witth retrieve two classes in a two tables.
Classes: A and B. B estends A.
When I have one
My repository.xml has this lines as new
In class descriptor of A:
extent-class class-ref=x.B /
In class descriptor of B:
reference-descriptor name=super class-ref=x.A
auto-retrieve=true
auto-update=true
auto-delete=true
foreignkey field-ref=idB /
Hi All,
Please read carefully and suggest me solution.
I am working with one MNC s/w company.My application
is web-based client-server application in which client
and server are on different machines and uses same
database. One imp thing one client might connect to
more than one servers.Each
Hi Tino,
Did you try something like this?
class-descriptor class=Company table=tblCompany ...
collection-descriptor
name=companyTeams
element-class-ref=CompanyTeam
orderby name=pos /
orderby name=c.name /
inverse-foreignkey field-ref=CompanyID/
Hi,
when launching my ojb app I'd like to test if the db connection is
available. I thought I can do something like this:
try
{
pb = PersistenceBrokerFactory.defaultPersistenceBroker();
pb.beginTransaction();
pb.commitTransaction();
}
catch (Exception e)
{
throw
I changed the code to obtain the connection from the
serviceConnectionManager, but the problem remains, I can't catch the
thrown java.sql.SQLException. Any ideas?
try
{
pb = PersistenceBrokerFactory.defaultPersistenceBroker();
pb.serviceConnectionManager().getConnection();
}
catch
Hi Sebastian,
I think it would be wiser to specify a validation query in the database
repository descriptor to check if the connection is valid *each* time it
is used. This will deal with not only the database being unavailable at
startup, but throughout the operation of the application.
BTW, I
Wie würde denn eine generische ValidationQuery aussehen, die einfach
überprüft, ob mit einer bestimmten DB/Instanz eine Verbindung
hergestellt werden kann?
Gelhar, Wallace Joseph wrote:
Hi Sebastian,
I think it would be wiser to specify a validation query in the database
repository descriptor
Armin,
The Javadocs are admittedly not very clear. From
org.odmg.Transaction#abort():
Abort and close the transaction. Calling abort abandons all
persistent object modifications and releases the associated
locks. Aborting a transaction does not restore the state of
modified
Hi,
thanks for the hint!
I will add a note deployment doc.
regards,
Armin
Nouguier Olivier wrote:
Hi all,
I've just spend few hours to try to retrieve a Transaction with
currenTransaction() from an Implementation issued from OJB.getInstance()
in a managed environement ( jboss ), it was alway
Sorry, forgot to switch to English ...
What would a generic ValidationQuery look like, that simply checks if a
certain database instance can be connected to?
Thanks.
Sebastian wrote:
Wie würde denn eine generische ValidationQuery aussehen, die einfach
überprüft, ob mit einer bestimmten
Hi Sebastian,
With SQL Server I use something like follows:
jdbc-connection-descriptor ...
connection-pool
maxActive=10
testOnBorrow=true
testOnReturn=false
testWhileIdle=true
timeBetweenEvictionRunsMillis=1
Hi Robert,
Robert wrote:
Hi,
I have some questions about OJB.
There are three APIs that you can use: Persistence Broker, ODMG and JDO.
Do you have to choose one of these APIs to use in your project, or is it
normal to mix them and use the one that is most convenient at the moment?
You have to
Hi Steve,
Steve Clark wrote:
Armin,
The Javadocs are admittedly not very clear. From
org.odmg.Transaction#abort():
Abort and close the transaction. Calling abort abandons all
persistent object modifications and releases the associated
locks. Aborting a transaction does not restore
Hi!!!
I try to mapping a boolean field in oracle.
I have put in field-descriptor: jdbc-type=BIT
the field in DB is NUMBER(1)
the attributte in class is boolean.
I use a fieldconversion:
conversion=org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion
in the field-descriptor.
Ok, I added the same validationQuery it works with mySQL as well. But
when I now turn of the db and start my application it simply exits and
now exception is thrown at all. How can I control the behaviour, when
the validationQuery doesn't validate?
thanks.
Gelhar, Wallace Joseph wrote:
Hi
Steve So what are others doing about this situation? Does
Steve everybody write their own snapshot/rollback code?
Armin You can simply request the object again after abort.
Does Transaction.abort() remove all of its registered objects from the
cache? If so, then this solution will
Hi All,
Please read carefully and suggest me solution.
I am working with one MNC s/w company.My application
is web-based client-server application in which client
and server are on different machines and uses same
database. One imp thing one client might connect to
more than one servers.Each
hi all sir
I have a problem with dynamic proxy.
can you help me now lock this code after
Best regards
Ngo Quyet Thang
,dListId=,position=0,identity=,realSubject=unmaterialized[EMAIL
PROTECTED]null,dListId=null,position=0,identity=null,realSubject=unmaterialized
proxy for UsersBean{1}],]]
file
I get the following error, which has been driving me crazy for over a week now. I know
I am getting connected to the database. I have a datasource in JBoss, and before I got
this error, I got other errors that showed that it was connecting to the database,
like Access Denied to user blah.
21 matches
Mail list logo