Re: [JBoss-user] Should I cache ejbRefs?

2003-06-06 Thread Lawrence Mount



I think they are talking about the EJBHomeFactory pattern as shown at http://java.sun.com/blueprints/patterns/ServiceLocator.html
Brian McSweeney wrote:

Hi
all,my app is fronended
with struts, using local beans.The
local beans use stateless session facades asa
frontend.In a book
discussing struts there is a chapter onusing
entity beans which describes how it is a goodidea
to cache the ejb refs in application scope.The
idea is, that it takes alot of time to create theJNDI
initial context etc.They
suggest using a ServletContextListener tocache
the ejb refs to the stateless session beansonce
the application starts up.Anyone
have any opinions on this?cheers,Brian


-- 
**
This message is intended for the named recipient only and is confidential
and no other person can place any reliance upon it.

The recipient acknowledges that transmissions made via the Internet can
be corrupted and therefore Chase de Vere Financial Solutions plc does not 
give any warranty as to the quality or accuracy of any information 
contained in this message or assumes any liability for it or for its 
transmission, reception or storage.

This footnote also confirms that this e-mail message has been swept for 
the presence of computer viruses.

Chase de Vere Financial Solutions plc is authorised and regulated by the 
Financial Services Authority and is an independent financial adviser.
**



Re: [JBoss-user] CMR and caching

2003-06-06 Thread Lawrence Mount
My experience is that using commit option A or D and cmr speeds up these
processes significantly once the caching kicks in.
Rafal Kedziorski wrote:

 hi,

 at this time we are not using CMR and I have a small question. whe have
 this three tables:

 tree structure:

 CREATE TABLE category_tree (
category_tree_id BIGINT NOT NULL,  -- (PK)
parent_idBIGINT,
mandant_id   BIGINT NOT NULL,  -- (FK)
position SMALLINT   NOT NULL,
path VARCHAR  (255),
description  VARCHAR  (255) NOT NULL,
 );

 translations:

 CREATE TABLE category_translated (
category_translated_id BIGINT  NOT NULL,  -- (PK)
language_idSMALLINTNOT NULL,  -- (FK)
entry  VARCHAR   (100) NOT NULL,
 );

 context:

 CREATE TABLE category_context (
category_context_idBIGINTNOT NULL,  -- (PK)
category_tree_id   BIGINTNOT NULL,  -- (FK)
category_translated_id BIGINTNOT NULL,  -- (FK)
 );

 now if we want a tree structure for given mandant_id than we do:

 category_treeLocalHome.findByMandantId(mandant_id) -- cached by JBoss

 for each category_tree_id do:
category_contextLocalHome.findByCategoryTreeId(category_tree_id) -- on
 each call as db, slow by much entries in category tree table

  for each category_context_id do
category_translatedLocalHome.findByPrimaryKey(category_translated_id)
 -- cached by JBoss

 would it be better to use CMR for better performance.

 we thinking about own caching implementation for the context informations.

 Regards,
 Rafal

 ---
 This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
 thread debugger on the planet. Designed with thread debugging features
 you've never dreamed of, try TotalView 6 free at www.etnus.com.
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user

-- 
**
This message is intended for the named recipient only and is confidential
and no other person can place any reliance upon it.

The recipient acknowledges that transmissions made via the Internet can
be corrupted and therefore Chase de Vere Financial Solutions plc does not 
give any warranty as to the quality or accuracy of any information 
contained in this message or assumes any liability for it or for its 
transmission, reception or storage.

This footnote also confirms that this e-mail message has been swept for 
the presence of computer viruses.

Chase de Vere Financial Solutions plc is authorised and regulated by the 
Financial Services Authority and is an independent financial adviser.
**


---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Commit Option B Behaviour JBOSS 3.0.3

2003-03-12 Thread Lawrence Mount
Hi,
I was wondering if any-one can explain the following behaviour.
I have not altered commit options in any way so my entity beans will be
operating under the default as defined in standardjboss.xml (B). All
methods that my client application calls are transactional and the
documentation states that under commit-option B 'Data is synchronised
from under-lying storage at the start of a transaction'.
The behaviour I am noticing is somewhat quirky:
1. If a row is deleted or inserted from the database manually then this
is picked up instantly.
2. If a particular column is modified then this is not picked up and the
old value is retained. If the container is restarted or I go out for
lunch then the new the bean is eventually refreshed.
This is particularly odd as in trace mode  whenever the client calls,
jboss displays EXECUTING SQL: SELECT A,B,C FROM D WHERE ID = ? but  then
does not refresh the bean with the new value of B. It appears that the
sql is being executed then ignored.
Have I misunderstood the meaning of 'synchronised' ie: Notices absence
or existing of new entities but not changes to their underlying data, or
is this a bug?
Please Please Help.
Thanks
Lawrence

-- 


MX Financial Solutions is a trading name of MX Moneyextra Financial
Solutions Ltd, which is regulated by the Financial Services Authority and a
member of the General Insurance Standards Council.

MX Moneyextra Financial Solutions Ltd is registered in England No. 3379907.

Registered Office: One Temple Back East, Temple Quay, Bristol BS1 6DX
A wholly owned subsidiary of Bristol  West plc.




---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Commit Option B Behaviour JBOSS 3.0.3

2003-03-12 Thread Lawrence Mount


-- 


MX Financial Solutions is a trading name of MX Moneyextra Financial
Solutions Ltd, which is regulated by the Financial Services Authority and a
member of the General Insurance Standards Council.

MX Moneyextra Financial Solutions Ltd is registered in England No. 3379907.

Registered Office: One Temple Back East, Temple Quay, Bristol BS1 6DX
A wholly owned subsidiary of Bristol  West plc.

---BeginMessage---
Hi,
I was wondering if any-one can explain the following behaviour.
I have not altered commit options in any way so my entity beans will be
operating under the default as defined in standardjboss.xml (B). All
methods that my client application calls are transactional and the
documentation states that under commit-option B 'Data is synchronised
from under-lying storage at the start of a transaction'.
The behaviour I am noticing is somewhat quirky:
1. If a row is deleted or inserted from the database manually then this
is picked up instantly.
2. If a particular column is modified then this is not picked up and the
old value is retained. If the container is restarted or I go out for
lunch then the new the bean is eventually refreshed.
This is particularly odd as in trace mode  whenever the client calls,
jboss displays EXECUTING SQL: SELECT A,B,C FROM D WHERE ID = ? but  then
does not refresh the bean with the new value of B. It appears that the
sql is being executed then ignored.
Have I misunderstood the meaning of 'synchronised' ie: Notices absence
or existing of new entities but not changes to their underlying data, or
is this a bug?
Please Please Help.
Thanks
Lawrence

---End Message---


Re: [JBoss-user] EntityBean findAll() method

2003-02-26 Thread Lawrence Mount
The method is perhaps not being run within a transaction since this behaviour
is typical of such.  To get all the results in one query override with
jboss-ql and use a 'strategy' of on find. All this is discussed in the
JBOSSCMP user guide.
Lawrence
Rafal Kedziorski wrote:

 Hi,

 my every entity beas has findAll() method defined in ejb-jar.xml as follow:

 query
   query-method
 method-namefindAll/method-name
   method-params/
   /query-method
   ejb-ql![CDATA[SELECT OBJECT(o) FROM firm o]]/ejb-ql
 /query

 Could be this done better by other mechanism? JBoss are generating this
 query for PostgreSQL:

 // get all id's
 LOG:  query: SELECT t0_o.firm_id FROM firm t0_o

 // call for every id
 LOG:  query:
 SELECT firm_id,name FROM firm WHERE (firm_id=1) OR (firm_id=2) OR
 (firm_id=1046258766552575) OR (firm_id=1046258766812847) OR
 (firm_id=1046258766781998) OR (firm_id=1046258766823725) OR (
 firm_id=1046258766815290) OR (firm_id=1046258766821931) OR
 (firm_id=1046258766808355) OR (firm_id=1046258766805899) OR
 (firm_id=1046258766840567) OR (firm_id=1046258766818653) OR
 (firm_id=1046258766857549) OR (firm_id=1046258766870043)

 ...

 LOG:  query: SELECT firm_id,name FROM firm WHERE
 (firm_id=1046258766821931) OR (firm_id=1046258766808355) OR
 (firm_id=1046258766805899) OR (firm_id=1046258766840567) OR
 (firm_id=1046258766818653) OR (
 firm_id=1046258766857549) OR (firm_id=1046258766870043)

 ...

 LOG:  query: SELECT firm_id,name FROM firm WHERE
 (firm_id=1046258766818653) OR (firm_id=1046258766857549) OR
 (firm_id=1046258766870043)

 ...

 LOG:  query: SELECT firm_id,name FROM firm WHERE
 (firm_id=1046258766857549) OR (firm_id=1046258766870043)

 ...

 // last sql query
 LOG:  query: SELECT firm_id,name FROM firm WHERE (firm_id=1046258766870043)

 why are sending JBoss not for every firm_id one query?

 I have other tables, where are stored much more values. which generate
 than longer query.

 Best Regards,
 Rafal

 ---
 This SF.net email is sponsored by: Scholarships for Techies!
 Can't afford IT training? All 2003 ictp students receive scholarships.
 Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
 www.ictp.com/training/sourceforge.asp
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user

-- 


MX Financial Solutions is a trading name of MX Moneyextra Financial
Solutions Ltd, which is regulated by the Financial Services Authority and a
member of the General Insurance Standards Council.

MX Moneyextra Financial Solutions Ltd is registered in England No. 3379907.

Registered Office: One Temple Back East, Temple Quay, Bristol BS1 6DX
A wholly owned subsidiary of Bristol  West plc.




---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] transaction setup question

2003-02-21 Thread Lawrence Mount
Runtime exceptions cause transactions to role back. Checked exceptions do not.
Lawrence
Justin Casp wrote:

 Hello,
 I'm hoping somebody out there can give me a hint on how to set up transaction
 attributes for session beans that behave in the following manner.

 ImportantBean has a method, 'doImportantWork' which throws MajorException
 UnimportantBean has a method 'doUnimportantWork' which throws TrivialException

 MainBean has a method 'doWork' :

 doWork() throws MajorException {
 ImportantBean.doImportantWork();
 try {
 UnimportantBean.doUnimportantWork();
 } catch (TrivialException t) {
 //do something that doesn't matter much
 }
 }

 If ImportantBean's method throws an exception, I want the transaction to be
 rolled back.  This is easy, standard behavior- no problem.

 I want to catch the TrivialException without causing the transaction to be
 rolled back for MainBean.  Currently, when I catch TrivialException in my
 MainBean method, the TX gets rolled back.

 I have tried setting the transaction attributes of UnimportantBean's methods
 to both NotSupported and RequiresNew, but both of these settings cause a
 transaction timeout with JBoss.  The other beans' methods are set to the
 default, 'Required'.

 I thought that by setting the UnimportantBean to 'NotSupported', I would be
 suspending the MainBean's transaction during this code's execution.  That
 way, if an exception was thrown in doUnimportantWork(), it wouldn't matter to
 MainBean.  Obviously, this reasoning is wrong, but I'm not sure why.  I guess
 having MainBean catch an exception as described above means the transaction
 context is re-entered/unsuspended when the exception is caught.

 Thank you in advance for saving me from transaction ignorance.
 Justin

 ---
 This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
 The most comprehensive and flexible code editor you can use.
 Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
 www.slickedit.com/sourceforge
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss-user -- confirmation of subscription -- request 630806

2003-02-18 Thread Lawrence Mount


 Original Message 
Subject: JBoss-user -- confirmation of subscription -- request 630806
Date: Tue, 18 Feb 2003 03:31:14 -0800
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

JBoss-user -- confirmation of subscription -- request 630806

We have received a request from 212.113.17.3 for subscription of your
email address, [EMAIL PROTECTED], to the
[EMAIL PROTECTED] mailing list.  To confirm the
request, please send a message to
[EMAIL PROTECTED], and either:

- maintain the subject line as is (the reply's additional Re: is
ok),

- or include the following line - and only the following line - in the
message body: 

confirm 630806

(Simply sending a 'reply' to this message should work from most email
interfaces, since that usually leaves the subject line in the right
form.)

If you do not wish to subscribe to this list, please simply disregard
this message.  Send questions to
[EMAIL PROTECTED]


---
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



[JBoss-user] cmr performance tuning for one to many relationships.

2003-02-18 Thread Lawrence Mount
I was wondering if anyone had come across ways of improving the
following situation.
I have a customer bean which has one to many relationships with several
other beans. If I want to read in 100 customers the initial finder users
an on-find strategy and thus obtains all core data in 1 query, however
for each of the relationships 100 queries are performed. The JBossCMP
book demonstrates some optimisation for 1-1 cmr relationships via load
groups but I have never seen such an example for 1-many and am not sure
how they would work.
Thanks
Lawrence



---
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