Multiple users accessing entity bean with same PK
Hi,
Some body please clarify the below issue.
(EJB 1.1, WAS3.5)
I have two app servers and two clones each clone is running in each app server.
Stateful session bean access Entity beans to update/read record in the database.
According to my requirement multiple users can access the same entity data (same primary key). Suppose user A created a Stateful session bean SB1 and the SB1 created Entity1 with PK1, this is happening at clone1.
User B accessed the site and the request went to Clone2 and a new SB2 created, but the SB2 need to access the database with Same PK1.
For the above situation, I guess container can not create a new Entity bean with PK1 because EB with PK1 is already there and it tries to allocate same EB1 with SB2, so if two requests are concurrent do the SB2 wait to get the handle of the EB1?
Is there any way to create two Entity beans with same Primary Key at the same time but in different clone?
Thanks,
Sagar
Hi,
The concurrency level has to be set at the level of database and the database will take care of consistency & integrity of the data. So specity the concurrency level on the database connection in each appserver.
Similar Messages
-
Did elationship fields in entity bean with CMP same as foreign key in table
did elationship fields in entity bean with CMP same as foreign key in table database.so we don't have to make some foreign key column in table database.
did Container handle that both.
I need some answer
thank'sSuppose you have Group and user entity. Relation is 1-m. One group many users. When you create user, you dont need to send group id, All you need is create user and add it in collection (cmr-field) in group(user belongs to). Container will add its group id in user entity as well as in db.
-
NON-transactional session bean access entity bean
We are currently profiling our product using Borland OptmizeIt tool, and we
found some interesting issues. Due to our design, we have many session beans which
are non transactional, and these session beans will access entity beans to do
the reading operations, such as getWeight, getRate, since it's read only, there
is no need to do transaction commit stuff which really takes time, this could
be seen through the profile. I know weblogic support readonly entity bean, but
it seems that it only has benefit on ejbLoad call, my test program shows that
weblogic still creates local transaction even I specified it as transaction not
supported, and Transaction.commit() will always be called in postInvoke(), from
the profile, we got that for a single method call, such as getRate(), 80% time
spent on postInvoke(), any suggestion on this? BTW, most of our entity beans are
using Exclusive lock, that's the reason that we use non-transactional session
bean to avoid dead lock problem.
ThanksSlava,
Thanks for the link, actually I read it before, and following is what I extracted
it from the doc:
<weblogic-doc>
Do not set db-is-shared to "false" if you set the entity bean's concurrency
strategy to the "Database" option. If you do, WebLogic Server will ignore the
db-is-shared setting.
</weblogic-doc>
Thanks
"Slava Imeshev" <[email protected]> wrote:
Hi Jinsong,
You may want to read this to get more detailed explanation
on db-is-shared (cache-between-transactions for 7.0):
http://e-docs.bea.com/wls/docs61/ejb/EJB_environment.html#1127563
Let me know if you have any questions.
Regards,
Slava Imeshev
"Jinsong HU" <[email protected]> wrote in message
news:[email protected]...
Thanks.
But it's still not clear to me in db-is-shared setting, if I specifiedentity
lock as database lock, I assumed db-is-shared is useless, because foreach
new
transaction, entity bean will reload data anyway. Correct me if I amwrong.
Jinsong
"Slava Imeshev" <[email protected]> wrote:
Jinsong,
See my answers inline.
"Jinsong Hu" <[email protected]> wrote in message
news:[email protected]...
Hi Slava,
Thanks for your reply, actually, I agree with you, we need to
review
our db
schema and seperate business logic to avoid db lock. I can not say,guys,
we need
to change this and that, since it's a big application and developedsince
EJB1.0
spec, I think they are afraid to do such a big change.Total rewrite is the worst thing that can happen to an app. The
better aproach would be identifying the most critical piece and
make a surgery on it.
Following are questions in my mind:
(1) I think there should be many companies using weblogic serverto
develop
large enterprise applications, I am just wondering what's the maintransaction/lock
mechanism that is used? Transional session / database lock,
db-is-shared
entity
I can't say for the whole community, as for my experience the standard
usage patthern is session fasades calling Entity EJBs while having
Required TX attribute plus plain transacted JDBC calls for bulk
reads or inserts.
is the dominant one? It seems that if you speficy database lock,
the
db-is-shared
should be true, right?Basically it's not true. One will need db-is-shared only if thereare
changes
to the database done from outside of the app server.
(2) For RO bean, if I specify read-idle-timeout to 0, it shouldonly
load
once at the first use time, right?I assume read-timeout-seconds was meant. That's right, but if
an application constantly reads new RO data, RO beans will be
constantly dropped from cache and new ones will be loaded.
You may want to looks at server console to see if there's a lot
of passivation for RO beans.
(3) For clustering part, have anyone use it in real enterpriseapplication?
My concern, since database lock is the only way to choose, how aboutthe
affect
of ejbLoad to performance, since most transactions are short live,if high
volume
transactions are in processing, I am just scared to death about
the
ejbLoad overhead.
ejbLoad is a part of bean's lifecycle, how would you be scared ofit?
If ejbLoads take too much time, it could be a good idea to profile
used SQLs. Right index optimization can make huge difference.
Also you may want cosider using CMP beans to let weblogic
take care about load optimization.
(4) If using Optimization lock, all the ejbStore need to do
version
check
or timestamp check, right? How about this overhead?As for optimistic concurrency, it performs quite well as you can
use lighter isolation levels.
HTH,
Slava Imeshev
"Jinsong Hu" <[email protected]> wrote in message
news:[email protected]...
We are using Exclusive Lock for entity bean, because of we do
not
want
to
load
data in each new transaction. If we use Database lock, that means
we
dedicate
data access calls to database, if database deadlock happens,
it's
hard
to
detect,
while using Exclusive lock, we could detect this dead lock in
container
level.
The problem is, using Exclusive concurrency mode you serialize
access to data represented by the bean. This aproach has negative
effect on ablity of application to process concurrent requests.As
a
result the app may have performance problems under load.
Actually, at the beginnning, we did use database lock and usingtransactional
The fact that you had database deadlocking issues tells that
application logic / database schema may need some review.
Normally to avoid deadlocking it's good to group database
operations mixing in updattes and inserts into one place so
that db locking sequence is not spreaded in time. Moving to
forced serialized data access just hides design/implementation
problems.
session bean, but the database dead lock and frequent ejbLoad
really
kill
us,
so we decided to move to use Exclusive lock and to avoid dead
lock,
we
change
some session bean to non-transactional.Making session beans non-transactions makes container
creating short-living transactions for each call to entity bean
methods. It's a costly process and it puts additional load to
both container and database.
We could use ReadOnly lock for some entity beans, but since weblogicserver will
always create local transaction for entity bean, and we found
transaction
commit
is expensive, I am arguing why do we need create container leveltransaction for
read only bean.First, read-only beans still need to load data. Also, you may seeRO
beans
contanly loading data if db-is-shared set to true. Other reason
can
be
that
RO semantics is not applicable the data presented by RO bean (forinstance,
you have a reporting engine that constantly produces "RO" data,
while
application-consumer of that data retrieves only new data and neverasks
for "old" data). RO beans are good when there is a relatively stable
data
accessed repeatedly for read only access.
You may want to tell us more about your app, we may be of help.
Regards,
Slava Imeshev
I will post the performance data, let's see how costful
transaction.commit
is.
"Cameron Purdy" <[email protected]> wrote:
We are currently profiling our product using Borland
OptmizeIt
tool,
and we
found some interesting issues. Due to our design, we have
many
session
beans which
are non transactional, and these session beans will access
entity
beans
to
do
the reading operations, such as getWeight, getRate, since
it's
read
only,
there
is no need to do transaction commit stuff which really takes
time,
this
could
be seen through the profile. I know weblogic support readonly
entity
bean,
but
it seems that it only has benefit on ejbLoad call, my test
program
shows
that
weblogic still creates local transaction even I specified
it
as
transaction not
supported, and Transaction.commit() will always be called
in
postInvoke(),
from
the profile, we got that for a single method call, such as
getRate(),
80%
time
spent on postInvoke(), any suggestion on this? BTW, most of
our
entity
beans are
using Exclusive lock, that's the reason that we use
non-transactional
session
bean to avoid dead lock problem.I am worried that you have made some decisions based on an improper
understand of what WebLogic is doing.
First, you say "non transactional", but from your description
you
should
have those marked as tx REQUIRED to avoid multiple transactions
(since
non-transactional just means that the database operation becomesits
own
little transaction).
Second, you say you are using exclusive lock, which you shouldonly
use
if
you are absolutely sure that you need it, (and note that it
does
not
work in
a cluster).
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"Jinsong Hu" <[email protected]> wrote in message
news:[email protected]...
> -
I am designing custom ATP for our client. Actually, this logic accesses batch classification data and the calculation logic also differs.
The concern that I have is if one user (say A) creates a sales order item and runs a successful Availability check and goes on to create second sales order item. simultaneously if another user (say B) comes to create new sales order item for same material. now the ATP quantity that second user gets should be less than the quantity confirmed by user A. But both the sales order have not been saved. so how do I block the quantities confirmed by A but yet not saved.
Is there any special method for multiple user access at runtime.Thanks for ur reply. it was really helpful to gain more insights in my issue.
1. For performance-related reasons, the only time when it makes sense to set the material block with quantity transfer is when it is common for several users to work on the same material simultaneously. And in VA01 there are many parallel Sales order creation
2.You create a sales order for a material. During the availability check, this material is blocked. After the availability check is completed, the block is removed. The quantity reserved for this transaction is recorded in the blocking table. This information can be assessed by all others who are working with this material. If you save the order, the blocked entries are cancelled. this how Material block with quantity transfer in SD works.
The concern that I have now is how to get Blocking Tables for transaction VA01. -
Prevent multiple users from editing/approving the same form SPD 2013,SP 2013
Hello all, I have a workflow with a to do task, the task is assigned to a group so any of the users in that group can go in and do a quality check on form data and approve it. How do I prevent multiple users from working on the
same form? do I just require check out? or is there a way to notify the rest of the group that a user has already started the quality check.The "Require Checkout" option is your best bet. You can also enable the auto checkout on edit option to allow minimal effort on the side of the user. Other users will then get the error message stating the item is checked out, if they try to
edit it.
If you'd like, you could add a workflow to the task list that triggers when something is changed. That workflow can check if the item is checked out and if so, email the other users assigned to the task.
I trust that answers your question...
Thanks
C
|
RSS |
http://crayveon.com/blog |
SharePoint Scripts | Twitter |
Google+ | LinkedIn |
Facebook | Quix Utilities for SharePoint -
ARCA Xtra - multiple user access to SQLite DB
Hi Guys,
I have having trouble with multiple users accessing a SQLite DB file from a projector. They can all open and browse the data through the projector fine, but if USER1 makes a change and clicks save, and then USER2 tries access the DB it causes USER2 to get a script error.
Is it possible to write a script which tells the user that the DB is being modified so please wait, rather than throwing them out of the projector with a script error
ThankyouIf you want multiple users to access a database then you would probably be better off using one designed for that purpose like MySQL.
But, if you are set on SQLite and if you can have multiple simultaneous connections which you seem to imply you can, then the best solution I can think of is to create a Class/Script that handles all the details of polling the database for availability and handles other issues like a progress dialogue box.
You have to treat the database as an asynchronous action - meaning you send it a query and at some latter time it sends a result back via a callback. Doing it this way greatly simplifies any database queries you want to make. As long as your queries are fairly simple like SELECT, INSERT, DELETE, etc. then the code is fairly straight forward.
Off the top of my head I wrote something to get you started. I have not tested this code but it does compile. The following is a Parent script that you would use to interface to your database in an asynchronous manner.
-- Asynchronus SQLite
property pDB -- instance of Arca xtra
property pTimeoutTime -- how long in milliseconds to ping database
property pPingTime -- time between database pings.
property RunningQuery -- Boolean. is a query running? true/false
property pTimeOb -- timout object for polling the database
property pCurOperation -- set of data for current query
property pPingCount -- how many times the current query has pinged the database
property pAlertBox -- a MIAW, LDM, or a Sprite that informs the user as to the progress of the query.
on new me
arcaregister([0000,000,0000])
pDB = xtra("arca").new()
Result = pDB.openDB(the moviepath & "ST_data")
if Result.errorMsg then
alert("Error Opening Database" & return & pDB.explainError(Result.errorMsg))
return void
end if
pTimeoutTime = 10000
pPingTime = 250
RunningQuery = false
pAlertBox = Sprite(1000) -- for example
return me
end new
on cleanup me
pDB.closeDB()
end cleanup
on executeSQL me, Query, CallbackOb, CallbackMethod, OptionalParameters
if RunningQuery then exit -- only allow one query at a time
RunningQuery = True
pCurOperation = [#Query:Query, #OptionalParameters:OptionalParameters, #CallbackOb:CallbackOb, #CallbackMethod:CallbackMethod]
pPingCount = 0
pTimeOb = timeout().new("QueryProcessor_"&me, 1, me, #processQuery) -- creating the timeout object here breaks the call stack, which is good.
end executeSQL
on processQuery me, TimeOb
Result = pDB.executeSQL(pCurOperation.Query, pCurOperation.OptionalParameters)
if Result.errorMsg then
if Result.errorMsg = 5 then -- database is currently locked
pPingCount = pPingCount + 1
if pPingCount = 1 then -- then inform user there will be a delay.
pAlertBox.setMessage("Waiting for database response.")
pAlertBox.setProgress(0)
pAlertBox.show()
pTimeOb.period = pPingTime
exit
end if
pAlertBox.setProgress((pPingCount * pPingTime / pTimeoutTime) * 100 )
if pPingCount * pPingTime = pTimeoutTime then -- timed out
alert("Query Timed out.")
else
exit -- try again in pPingTime time.
end if
else -- there is some sort of database error
alert("Database Error: " & return & pDB.explainError(Result.errorMsg))
end if
else -- no query errors
call(pCurOperation.CallbackMethod, pCurOperation.CallbackOb, Result)
end if
-- if the code makes it this far then we are done and need to clean things up
if pTimeOb. objectP then
pTimeOb.forget()
pTimeOb = void
end if
pAlertBox.hide()
RunningQuery = false
end processQuery
on setTimeOutTime me, MilliSecs
pTimeoutTime = MilliSecs
end setTimeOutTime
on setPingTime me, MilliSecs
pPingTime = MilliSecs
end setPingTime
You then create an instance of this script on preparemovie.
-- Movie script
global gDB
on prepareMovie
gDB = script("Asynchronus SQLite").new()
if gDB.voidP then halt -- can not connect to the database
end
on stopMovie
gDB.cleanup()
end
Then it is simply a matter of sending your queries to the gDB object and it will send the results back to the callback handler and object that you specify. Here's a behavior that shows how simple this should be:
-- Sample DB Behavior
global gDB
on mouseUp me
Query = "select * from users"
gDB.executeSQL(Query, me, #setQueryResult) -- string, callback object, callback handler name
end
on setQueryResult me, Result -- this is the callback handler/method
put Result
end
I also suggest using a MIAW or a LDM or a set of sprites as a way to inform the user of any delays in processing a query. Check the code for pAlertBox to see how I use this idea to update a progress bar. Of course you will have to create the implementation. -
If multiple users will be using the same iPad, how can I lock it so the settings cannot be changed, specifically the languages(students are changing the languages)?
Even with Apple Configurator most of the settings cannot be locked, and that includes the language settings. Most schools and organizations seem to just accept that they'll have to reconfigure the iPads on a regular basis.
Regards. -
Error While Deploying A CMP Entity Bean With A Composite Primary Key
Hello all,
I have a problem deploying CMP Entity beans with composite primary keys. I have a CMP Entity Bean, which contains a composite primary key composed of two local stubs. If you know more about this please respond to my post on the EJB forum (subject: CMP Bean Local Stub as a Field of a Primary Key Class).
In the mean time, can you please tell me what following error message means and how to resolve it? From what I understand it might be a problem with Sun ONE AS 7, but I would like to make sure it's not me doing something wrong.
[05/Jan/2005:12:49:03] WARNING ( 1896): Validation error in bean CustomerSubscription: The type of non-static field customer of the key class
test.subscription.CustomerSubscriptionCMP_1530383317_JDOState$Oid must be primitive or must implement java.io.Serializable.
Update the type of the key class field.
Warning: All primary key columns in primary table CustomerSubscription of the bean corresponding to the generated class test.subscription.CustomerSubscriptionCMP_1530383317_JDOState must be mapped to key fields.
Map the following primary key columns to key fields: CustomerSubscription.CustomerEmail,CustomerSubscription.SubscriptionType. If you already have fields mapped to these columns, verify that they are key fields.Is it enough that a primary key class be serializable or all fields have to implement Serializable or be a primitive?
Please let me know if you need more information to answer my question.
Thanks.
NikolaHi Nikola,
There are several problems with your CMP bean.
1. Fields of a Primary Key Class must be a subset of CMP fields, so yes, they must be either a primitive or a Serializable type.
2. Sun Application Server does not support Primary Key fields of an arbitrary Serializable type (i.e. those that will be stored
as BLOB in the database), but only primitives, Java wrappers, String, and Date/Time types.
Do you try to use stubs instead of relationships or for some other reason?
If it's the former - look at the CMR fields.
If it's the latter, I suggest to store these fields as regular CMP fields and use some other value as the PK. If you prefer that
the CMP container generates the PK values, use the Unknown
PrimaryKey feature.
Regards,
-marina -
I have multiple users on my computer with separate iTunes libraries. can we share?
I have multiple users on my computer with separate iTunes libraries. Is it possible to share the libraries? The "share library" preference doesn't seem to work.
Hi b noir, I also have two users on one pc with two different iTunes libraries. But I also want to put them onto an external hard drive so that I can free up some memory on the pc. So I figure I need to consolidate the two users iTunes libraries first before moving to hard drive? But not quite sure how to do that on the iTunes 11? Thanking you in advance!!
-
Is it possible to map the cmp fields of the entity bean with out dictionary
Dear sirs,
I have created the EJB project module and WEB Module. Now i have to map the CMP fields of the entity bean to the underlying table. Is it possible to map the cmp fields of the entity bean with out java dictionary? If yes how can we do that.
I have got some error while mapping an EJB's CMP fields to the table through dictionary. I was actually intended to map 79 fields but it gives an error that more than 64 fields are not allowed while building the dictionary.
1. Can you tell me what could be the possible reason?
2. Is it possible to map the cmp fields of the entity bean with out java dictionary? If yes how can we do that.
Kindly helo me,
Sudheesh K SHi,
Sudheesh please check up if the below link helps,there are other ways of writing the persistent.xml for container managed entity bean.
http://help.sap.com/saphelp_nw04s/helpdata/en/9b/f695f0c84acf46a4e0b31f69d8a9b7/frameset.htm, probably in the studio you cannot browse through tables not in the java dictionary,but manually editing it may still solve the problem.
Also here is another link that specifies the databases supported by J2EE Engine.
http://help.sap.com/saphelp_nw04s/helpdata/en/66/a5283eeb47b40be10000000a114084/frameset.htm
The below link shows how to specify the database vendor and datasource
http://help.sap.com/saphelp_nw04s/helpdata/en/e1/67fc3ee241ba28e10000000a114084/frameset.htm
Hope you are able to solve the problem.
Do let us know if you come up with the solution.
Regards,
Harish
Message was edited by: HARISH SUBRAMANIAN -
Creating entity beans with auto numbered primary key
I have two entity bean with a CMR between them. I am successfully creating the first one but when I try and create the child entity bean I get a NullPointerException.
Now I think this is because the gernerated code tries to get the primary key of the created entity bean and this is not set as it is set using a auto number in the database (An oracle sequence and trigger).
Is there anyway i can get round this problem?
Thanks in advance,
AdrianThis is the auto generated code:
public dmd.sync.ejbs.entity.AppliancePackInfoLocal create_Local(dmd.sync.dataobjects.dto.AppliancePackInfoDTO appliancePackInfoDTO, dmd.sync.ejbs.entity.AmppLocal amppLocal) throws javax.ejb.CreateException, java.rmi.RemoteException {
BeanO beanO = null;
dmd.sync.ejbs.entity.AppliancePackInfoLocal result = null;
boolean createFailed = false;
boolean preCreateFlag = false;
try {
beanO = super.createBeanO();
dmd.sync.ejbs.entity.AppliancePackInfoBean bean = (dmd.sync.ejbs.entity.AppliancePackInfoBean) beanO.getEnterpriseBean();
preCreateFlag = super.preEjbCreate(beanO);
bean.ejbCreate(appliancePackInfoDTO, amppLocal);
Object ejsKey = keyFromBean(bean);
result = (dmd.sync.ejbs.entity.AppliancePackInfoLocal) super.postCreate_Local(beanO, ejsKey, true);
bean.ejbPostCreate(appliancePackInfoDTO, amppLocal);
super.afterPostCreate(beanO, ejsKey);
It must be falling over on the last line as it calls the ejbPostCreate fine. -
Entity bean with primary key generated by trigger
Hi,
We have a table(oracle) with one column as primary key,
but the primary key is generated by trigger every time
a new row is inserted into this table, inside the trigger,
it uses oracle sequence to get the next val.
If we want to use entity bean with it, what should we specify, it's not application-managed primay key, it's
not auto-generated primary key either. How can we resolve
it without change the database part.
Any thought is appreciated.
Thanks
afangThe code is already there with JDBC call inserting
into the table, the inserting trigger then will generate
sequence key and being inserted into primary key column.
Now wondering if it's possible to change the code to use entity bean but without modifying the trigger (since it contains other business logics). -
Bad Performance/OutOfMemory Error in CMP Entity Bean with Large DB
Hello:
I have an CMP Entity deployed on WLS 7.0
The entity bean maps to a table that has 97,480 records.
It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
I have a JSP client that invokes the findALL()
The performance is very poor ~ 150 seconds just to perform the findAll() - (Benchmark
from within the JSP code)
If more than one simultaneous call is made then I get outOfMemory Error.
WLS is started with max memory of 512MB
EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
(without max-beans-in-cache directive the performance is worse)
Is there any documentation available to help us in deploying CMP Entity Beans
with very large number of records (instances) ?
Any help is greatly appreciated.
Regards
RajanHi
You should use a Select Method, it does support cursors.
Or a Home Select Method combination.
Regards
Thomas
WLS is started with max memory of 512MB
EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>>
(without max-beans-in-cache directive the performance is worse)>
Is there any documentation available to help us in deploying CMP
Entity Beans with very large number of records (instances) ? Any help
is greatly appreciated.>
Regards>
Rajan>
>
"Rajan Jena" <[email protected]> schrieb im Newsbeitrag
news:3dadd7d1$[email protected]..
>
Hello:
I have an CMP Entity deployed on WLS 7.0
The entity bean maps to a table that has 97,480 records.
It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
I have a JSP client that invokes the findALL()
The performance is very poor ~ 150 seconds just to perform the findAll() -(Benchmark
from within the JSP code)
If more than one simultaneous call is made then I get outOfMemory Error.
WLS is started with max memory of 512MB
EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
(without max-beans-in-cache directive the performance is worse)
Is there any documentation available to help us in deploying CMP EntityBeans
with very large number of records (instances) ?
Any help is greatly appreciated.
Regards
Rajan -
CMP Entity Bean with ejb-ql finder methods and INFORMIX database
Hi,
I have some CMP Entity Beans with finder methods defined in ejb-ql. In my ejb-jar, within <entity> definitions I have something like:
<entity>
<abstract-schema-name>BeanName</abstract-schema-name>
<cmp-field><field-name>fieldOne</field-name></cmp-field>
<cmp-field><field-name>fieldTwo</field-name></cmp-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>SELECT OBJECT(o) FROM BeanName o</ejb-ql>
</query>
<entity>
And in persistent.xml:
<db-properties>
<data-source-name>datasource_name</data-source-name>
</db-properties>
<entity-bean>
<ejb-name>BeanName</ejb-name>
<table-name>table_name</table-name>
<field-map key-type="NoKey">
<field-name>fieldOne</field-name>
<column><column-name>column_one</column-name></column>
</field-map>
<field-map key-type="NoKey">
<field-name>fieldTwo</field-name>
<column><column-name>column_two</column-name></column>
</field-map>
<finder-descriptor>
<method-name>findAll</method-name>
<method-params/>
</finder-descriptor>
Once deployed, on server side, I can found a java source file (with corresponding compiled class file) in path:
j2ee/cluster/server0/apps/companyName/MyEARApp/EJBContainer/temp/temp38837373733/route/to/package/
with names:
BeanName0_0pm.java
BeanName0_0PM.class
and the generated java file contains this code:
public java.util.Enumeration ejbFindAll() throws javax.ejb.FinderException, javax.ejb.EJBException {
TransactionContext tc = pm.getTransactionContext();
Connection conn = null;
PreparedStatement pSt = null;
ResultSet ejb_rs = null;
int status = javax.transaction.xa.XAResource.TMSUCCESS;
try {
conn = pm.getConnectionForFindMethod();
pSt = conn.prepareStatement("SELECT \"O\".\"COLUMN_ONE\",\"O\".\"COLUMN_TWO\", FROM \"TABLE_NAME\" \"O\"");
ejb_rs = pSt.executeQuery();
I'm trying to call this method but it throws a SQLException when preparing the statement.
It seems that Informix does not like this SQL syntax because of upper case names, doble quotes on table alias, or something else.
When editing persistent.xml in netweaver, I can define the element <datasource-vendor> as ORACLE, SAPDB, MS_SQL_SERVER, DB2_UDB_AS400 or DB2_UDB_OS390 but INFORMIX is not an accepted value.
Is there any way to define how this SQL query is build?
Thanks in advance.The return type of the finder method defined in the remote home interface is either the entity bean's remote interface or a collection of objects implementing the entity bean's remote interface. The return type of the finder method defined in the local home interface is either the entity bean's local interface or a collection of objects implementing the entity bean's local interface
-
Can Entity Bean with Home Business Method replace Stateless Session Bean?
Since Entity Bean can have business methods in the Home Interface, can we use Entity Bean with Home Business Methods to replace Stateless Session Bean?
I am assuming we can get better performance by doing this since the overhead of creating Component Object can be avoided as compared to stateless session beans.Requires-new makes the container start a new transaction. Only use that flag
at the point that you are certain that a NEW transaction should BEGIN. I
suggest you use Required as your default for all methods in the application,
and only change that to anything else when you are certain that you should.
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"A.J,LEE" <[email protected]> wrote in message
news:3ba5adb2$[email protected]..
>
> I find it result in "dead lock"
> when I call RequiresNew attributed CMP method in session Bean.
> Then, Is it possible to use CMP which is set with "RequiresNew"
transaction attribute?
>
> I Wonder why.
>
> Thanx in advance.
Maybe you are looking for
-
Clearing variable from Request object
Hi everyone, After getting value from request.getParameter("var"), I want to clear this "var" variable from request scope. So that in the next coming statements if i again call the same request.getParameter("var") statement than it must return null S
-
I can make calls and send texts on my new iPhone 5, but all incoming calls and texts are received by my old (non-Apple) phone.
-
How to decode and display jpeg from a bytes stream ?
Hello. I am new to Flex and got stuck on something that I assume has an easy solution. I have an RIA application in which I want to display a jpeg image. this image was sent on a Web Service message, as an array of bytes (I just read the jpeg file a
-
I have just downloaded itunes. I cannot install QT as an older version is in place. Cannot remove the older version using CP. Any ideas?
-
Printer Profiles for Epson R260
I need to download UCC Printer Profiles for my Epson 260. But the website doesn't list any. It does show profiles for the R2200. Where are they?