Bean-managed persistence (BMP) in EJB 3.0
I've been on the google for a few days now and haven't found one single notion on bean-managed persistence in EJB 3.0 specification. Even the official specification PDFs don't mention it :(
Help! I need BMP! Does anybody know what's the situtation in EJB 3.0? Can I and how mark an entity bean to be bean-managed persistent and use ejbLoad and ejbStore functions like in the EJB 2.0 or something like that?
Tnx in advance,
Igor
Tnx Frank, I was afraid of that :(
I think that is a step back for the EJB technology. Now it is fixed to the table structure, every change in the database calls for a re-desing, re-compilation and re-deplyoment.
With BMP in EJB 2.1 one was able to build a bean that modifies itself according to the table structure dinamically. Is there any way to do it in EJB 3.0?
Igor
Similar Messages
-
Bean-managed persistence?
Hi,
Can someone explain to me if there is a diffetent between bean managed persistence and bean managed transaction?
Or where I can read about it?
Thanks,
Juliasun has several articles about both of these concepts. You can probably find them via an Internet search. Here is one of the documents:
http://java.sun.com/j2ee/tutorial/1_3-fcs/index.html -
Bean Managed Persistence and Object Fields
I'm having trouble persisting data in the fields in my EJB. I have posted the code for my EJB below:
package com.kns.account.ejb;
import java.sql.*;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.CreateException;
import javax.ejb.FinderException;
* @stereotype EntityBean
public class AccountBeanEJB implements EntityBean
public int id;
public String username;
public String password;
* The container assigned reference to the entity
private EntityContext context;
* @return
public AccountBeanEJB() {
* Sets the context of the bean
* @param ec
public void setEntityContext(EntityContext ec) {
context = ec;
// to do: code goes here.
* Clears the context of the bean
public void unsetEntityContext() {
this.context = null;
// to do: code goes here.
* This method is called when the container picks this entity object
* and assigns it to a specific entity object. Insert code here to
* acquire any additional resources that it needs when it is in the
* ready state.
public void ejbActivate() {
* This method is called when the container diassociates the bean
* from the entity object identity and puts the instance back into
* the pool of available instances. Insert code to release any
* resources that should not be held while the instance is in the
* pool.
public void ejbPassivate() {
* @return
public Integer ejbCreate(int theId, String theUsername, String thePassword)
throws CreateException
System.out.println("Creating new account");
String sqlstr = "Insert into Account (ACCOUNTID, USERNAME, PASSWORD)";
sqlstr = sqlstr + " VALUES(" + theId + ", '" + theUsername + "', '" + thePassword + "')";
Connection conn = null;
try
conn = getConnection();
Statement stmt = conn.createStatement();
stmt.executeUpdate(sqlstr);
System.out.println(sqlstr);
this.id = theId;
this.password = thePassword;
this.username = theUsername;
System.out.println("Done creating new account");
catch(Exception e)
e.printStackTrace();
finally
try
conn.close();
catch(Exception e)
return new Integer(this.id);
public void ejbPostCreate(int id, String username, String password) {
* @return
public Integer ejbFindByPrimaryKey(Integer key)
throws FinderException {
// to do: code goes here.
this.id = key.intValue();
return (key);
public void changePassword(String newPassword)
this.password = newPassword;
* @return
public int createAccount(String username, String password) {
// to do: code goes here.
return (0);
public void ejbRemove()
String sqlstr = "Delete * from Account Where ACCOUNTID = " + this.id;
Connection conn = null;
try
conn = getConnection();
Statement stmt = conn.createStatement();
stmt.executeUpdate(sqlstr);
catch(Exception e)
e.printStackTrace();
finally
try
conn.close();
catch(Exception e)
public void ejbLoad()
System.out.println("In ejbLoad");
String sqlstr = "Select * from Account Where ACCOUNTID = " + this.id;
System.out.println(sqlstr);
Connection conn = null;
try
conn = getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sqlstr);
if(rs.next())
this.password = rs.getString("Password");
System.out.println("password = " + this.password);
this.username = rs.getString("Username");
System.out.println("username = " + this.username);
catch(Exception e)
e.printStackTrace();
finally
try
conn.close();
catch(Exception e)
public void ejbStore()
System.out.println("In ejbStore");
String sqlstr = "Update Account Set Username = '" + this.username + "', Password = '" + this.password + "' Where ACCOUNTID = " + this.id;
System.out.println(sqlstr);
Connection conn = null;
try
conn = getConnection();
Statement stmt = conn.createStatement();
stmt.executeUpdate(sqlstr);
catch(Exception e)
e.printStackTrace();
finally
try
conn.close();
catch(Exception e)
public String getPassword()
//ejbLoad();
return this.password;
public String getUsername()
//ejbLoad();
return this.username;
private Connection getConnection() throws ClassNotFoundException, SQLException
Class.forName("weblogic.jdbc20.pool.Driver");
return DriverManager.getConnection("jdbc20:weblogic:pool:pwxPool");
public void removeAccount() {
It seems like id, username, and password fields are not stored between calls. Here is some sample output from my weblogic server:
Account found for id = 99
in ejbStore
Update Account set Username= 'null', Password ='null' Where accountId = 0
Does anyone know how to fix this? I'm banging my head on the desk over here. Thank you.These functions always return null! Please help me!
public String getPassword()
//ejbLoad();
return this.password;
public String getUsername()
//ejbLoad();
return this.username; -
Has someone experiance with bean managed persistence withWAS Java and NWDS?
Thank you for any answers?
MehmetHi mehmet
Here are some links which might help you with respect tp BMP
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/842584e5-0601-0010-509c-aced995b60db
/people/stepan.samarin/blog/2004/06/16/choosing-your-persistency-strategy-java-j2ee
/people/madhusudhan.buragapally/blog/2005/02/15/challenges-while-deploying-a-j2ee-application-on-sap-web-application-server
Hope this helps , please do not forget to reward poinst if u find it helpful
regards
rajesh kr -
Bean-Managed vs. Container-Managed Persistence
Hello,
I would like the real world skinny on bean-managed persistence vs. container-managed persistence. I have heard the bean-managed offers higher scalability and performance, while container-managed offers simplicity but with a cost. Can someone give me some perspective?
Thanks,
Rob MillerWrong forum, but I guess if you are new to java it could be argued that anything goes...
General rule:
use CMP if you don't have worries about speed or legacy systems.
use BMP if you need to control the persistence and/or want to connect to legacy host systems. BMP allows you to set up caching and transaction handlers to handle the presistence in a manner more suited to your needs. -
Clustering read-only bean-managed entity ejbs
I'm designing a data caching approach that relies on using read-only entity ejbs with bean-managed persistence. My design is based on the fact that WebLogic blocks on entity bean access by concurrent users for a given bean instance (unique primary key). I would like to keep only one entity bean instance active(timeoutSetting=0) for eacy primary key for all users to share. That way I only have to hit the database one time to initially populate data in the entity bean. I'm worried about this approach in a WebLogic clustered environment. From reading notes in this newsgroup and other doc, it appears that WebLogic might not use one instance of the entity bean (based upon unique primary key) in a clustered environment. Is that true (that being multiple users could get their own instance of the entity bean with the same primary key)?
Thanks,
Bryan
Typically, the read-write EJBs are on each WL server instance, so there is
no remote invocation -- it is all done by reference.
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Bryan Dixon" <[email protected]> wrote in message
news:[email protected]...
>
> I guess I'm confused about read-write (not read-only) entity beans being
pinned or not. This is from WebLogic 5.1 EJB doc:
> "read-write entity EJBs do not use a clustered EJBObject stub; a client's
method calls to a particular EJB always go to a single WebLogic Server
instance. If the server that a client is using fails, the client must
re-find the entity EJB using the cluster-aware home stub."
>
> Doesn't that mean the entity bean instance for a primary key is pinned to
a single WebLogic Server instance? Maybe I'm just misunderstanding
terminology about what a "particular EJB" is - I was thinking it is an
entity bean instance for a unique primary key.
>
> Thanks,
> Bryan
>
>
> "Cameron Purdy" <[email protected]> wrote:
> >>I was thinking that read-write entity beans were pinned.
> >
> >Not unless you pin them. Basically, that means that the JAR/XML that
> >contains/specifies the EJB only is on one server.
> >
> >> So if two separate weblogic instances in a cluster did a find on an
entity
> >ejb with the same primary key and then performed some business method on
> >that entity ejb, would there really be two separate bean instances in
each
> >weblogic instance for the same primary key?
> >
> >If it is not pinned, yes.
> >
> >--
> >Cameron Purdy
> >Tangosol, Inc.
> >http://www.tangosol.com
> >+1.617.623.5782
> >WebLogic Consulting Available
> >
> >
> >"Bryan Dixon" <[email protected]> wrote in message
> >news:[email protected]...
> >>
> >> Toa, thanks again.
> >>
> >> There are a couple of things I'm not clear about though. One is that I
> >want one instance of an entity bean per primary key, not a singleton of
the
> >entity bean itself. How would JNDI in a clustered environment help me
> >there?
> >>
> >> The other question I have is about having multiple instances of an
entity
> >bean for the same primary key in the cluster. I was thinking that
> >read-write entity beans were pinned. So if two separate weblogic
instances
> >in a cluster did a find on an entity ejb with the same primary key and
then
> >performed some business method on that entity ejb, would there really be
two
> >separate bean instances in each weblogic instance for the same primary
key?
> >>
> >> Thanks again,
> >> Bryan
> >>
> >> "Tao Zhang" <[email protected]> wrote:
> >> >
> >> >"Bryan Dixon" <[email protected]> wrote:
> >> >>
> >> >>The reason I was wanting one instance per primary key is that I want
to
> >use this entity bean to cache some data from database tables. This data
> >doesn't change frequently, so we were wanting to get it from this entity
> >bean's memory instead of constantly hitting the database. This data is
> >global to all users, so we don't want to store it in stateful session
beans.
> >> >>
> >> >>After reading more about the read-only cache-strategy it doesn't
appear
> >that any sycnhronization will occur if the entity bean for a given
primary
> >key is updated (state data is updated) in one weblogic instance, that
change
> >will not get synced up with other weblogic instances for that same
primary
> >key. Is that correct?
> >> >>
> >> >It's correct. If you do want to have exact one copy in the cluster.
You
> >can read Using JNDI in cluster environment.
> >> >
> >> >>If I deploy this entity bean with read-write cache-strategy the
WebLogic
> >doc reads as if I will get one instance per primary key that is pinned to
> >one WebLogic instance and I won't get any fail-over or load-balancing on
the
> >ejbObject (the entity bean instance). Did I read this correctly? If
that
> >is the case, what is the advantage of setting up read-write entity beans
to
> >be clusterable - just the Home objects? I definitely could be
> >misunderstanding something in the doc since I'm very new to clustering.
> >> "Tao
> >> >Zhang"
> >> ><[email protected]> wrote:
> >> >>>
> >> >
> >> >It's not only instance in the cluster. Probably many instances.
> >> >
> >> >If you use 2 tier clustering, failover will not happen because of
> >co-location. But if you use 3 tier cluster, you can write the special
code
> >in the client side to do failover and load-balance.
> >> >
> >> >In a 2 tier cluster, actually the ejb load balancing and failover is
> >almost useless.
> >> >
> >> >But in 3 tier, you can use it.
> >> >
> >> >Hope this help.
> >> >
> >> >
> >> >
> >> >>>"Bryan Dixon" <[email protected]> wrote:
> >> >>>>
> >> >>>>Thanks Tao.
> >> >>>>
> >> >>>>A couple more questions...
> >> >>>>I was planning deploying this entity bean with the read-only
> >cache-strategy which means our transaction attribute would be
> >TXN_NOT_SUPPORTED. Also, our db isolation is TRANSACTION_READ_COMMITTED.
> >> >>>>
> >> >>>>Based upon how I was planning on deploying this entity bean, would
> >WebLogic create an instance of the bean for each primary key in each
> >cluster? I'm just trying to figure out how many duplicate bean instances
> >for the primary key I could have across all clusters. I was really just
> >wanting one instance that is shared among all clients and was hoping that
> >the clustering would provide me with fail-over if that one cluster went
> >down.
> >> >>>>
> >> >>>If you use 3 tier cluster structure, it's impossible to know how
many
> >instances of ejb with the same primary key. Probably one instance for
each
> >wls instance.
> >> >>>In wls5.1, it's impossible to host only read only entity bean
instance
> >in the 3-tier cluster. Because read only entity bean are clusterable in
both
> >home and remote interface.
> >> >>>
> >> >>>>Regarding making the bean a pinned service, which it sounds like I
> >might have to do to get the results I want, how do I do that? Is that a
> >deployment descriptor setting? Also, if I make it a pinned service, do I
> >get any fail-over suport by clustering the bean?
> >> >>>>
> >> >>>For the pinned service, you can just deployed on one or several
server
> >instances. The per-server properties file is a good place to put the
> >weblogic.ejb.deploy property. If only one pinned service in the cluster,
you
> >can't get fail over. If the that server instance fails, the home stub
will
> >be removed from the jndi in other server instances.
> >> >>>
> >> >>>Why do you must need only one instance in the cluster? Do you want
> >exact-only-copy? You can read Using JNDI doc about its in cluster
> >environment.
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>>Thanks again,
> >> >>>>Bryan
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>>"Tao Zhang" <[email protected]> wrote:
> >> >>>>>
> >> >>>>>
> >> >>>>>Bryan Dixon <[email protected]> wrote in message
> >> >>>>>news:[email protected]...
> >> >>>>>>
> >> >>>>>> I'm designing a data caching approach that relies on using
> >read-only
> >> >>>>>entity ejbs with bean-managed persistence. My design is based on
the
> >fact
> >> >>>>>that WebLogic blocks on entity bean access by concurrent users for
a
> >given
> >> >>>>>bean instance (unique primary key). I would like to keep only one
> >entity
> >> >>>>>bean instance active(timeoutSetting=0) for eacy primary key for
all
> >users to
> >> >>>>>share. That way I only have to hit the database one time to
> >initially
> >> >>>>>populate data in the entity bean. I'm worried about this approach
in
> >a
> >> >>>>>WebLogic clustered environment. From reading notes in this
newsgroup
> >and
> >> >>>>>other doc, it appears that WebLogic might not use one instance of
the
> >entity
> >> >>>>>bean (based upon unique primary key) in a clustered environment.
Is
> >that
> >> >>>>>true (that being multiple users could get their own instance of
the
> >entity
> >> >>>>>bean with the same primary key)?
> >> >>>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>It's true. In a cluster environment, each wls instance can have
their
> >ejb
> >> >>>>>instance. The block of concurrent access to the ejb data is up to
> >your
> >> >>>>>transaction attribute and isolation level and your database.
> >> >>>>>
> >> >>>>>If you only want to keep one instance active, you can make the
> >read-only
> >> >>>>>entity bean a pinned service, to be deployed in one instance. But
the
> >> >>>>>network overhead is worse.
> >> >>>>>
> >> >>>>>
> >> >>>>>> Thanks,
> >> >>>>>> Bryan
> >> >>>>>
> >> >>>>>
> >> >>>>
> >> >>>
> >> >>
> >> >
> >>
> >
> >
>
-
I've been on the google for a few days now and haven't found one single notion on bean-managed persistence in EJB 3.0 specification. Even the official specification PDFs don't mention it :(
Help! I need BMP! Does anybody know what's the situtation in EJB 3.0? Can I and how mark an entity bean to be bean-managed persistent and use ejbLoad and ejbStore functions like in the EJB 2.0 or something like that?
Tnx in advance,
IgorHi Sumit,
The direction the spec took was to define a completely new persistence model rather than try to retrofit the old BMP/CMP model. As with all Java EE releases, all requirements supported in previous releases of the platform continue to be supported. That's why you can continue to choose to develop using BMP if you'd like.
However, there is no architected relationship between the Java Persistence API and BMP/CMP. One thing the Java Persistence API and CMP have in common is the belief that all database interaction code should be perfomed by the system layer and not reside in the application.
That's why you don't see BMP-like features within the new Persistence API. In addition, Entity classes developed using the Java Persistence API are not EJB components. The Java Persistence API can be used from any Java EE component (EJB, web component, Application Client) and from J2SE.
The Java Persistence API does define many lifecycle callbacks events (e.g. @PrePersist, @PreUpdate, etc.) that can be delivered to the Entity class. However, these are intended for performing tasks other than direct interaction with the persistent store.
--ken -
I am trying to execute EJB example on bean managed persistence from the book
It give me this error:
Error unmarshalling return; nested exception is:
java.io.invalidclassException:c8e.z.a;class invlaid for serailization
I tried examples from the net but same error shows up
please help me regarding thisHey it returns the string object ...
here is snippet of my EJB and Client code........
import java.sql.*;
import javax.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
public class AccountEJB implements EntityBean {
private String id;
private String firstName;
private String lastName;
private double balance;
private EntityContext context;
private Connection con;
private String dbName = "java:comp/env/jdbc/account";
public void debit(double amount)
throws InsufficientBalanceException {
if (balance - amount < 0) {
throw new InsufficientBalanceException();
balance -= amount;
public void credit(double amount) {
balance += amount;
public String getFirstName() {
return firstName;
public String getLastName() {
return lastName;
public double getBalance() {
return balance;
public String ejbCreate(String id, String firstName,
String lastName, double balance)
throws CreateException {
if (balance < 0.00) {
throw new CreateException
("A negative initial balance is not allowed.");
try {
insertRow(id, firstName, lastName, balance);
} catch (Exception ex) {
throw new EJBException("ejbCreate: " +
ex.getMessage());
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.balance = balance;
return id;
client code::::::::::::
public class AccountClient {
public static void main(String[] args) {
try {
Context initial = new InitialContext();
Object objref = initial.lookup("MyAccount");
AccountHome home =
(AccountHome)PortableRemoteObject.narrow(objref,
AccountHome.class);
Account duke = home.create("123", "Duke", "Earl", 0.00);
duke.credit(88.50); -
Container Managed Persistence entity bean relationship fields
I want to ask something that until now still confuse. Did Relationship fields in Container Managed Persistence entity beans declare , inside Database table or only Persistence fields .
If Relationship fields not declare inside database table ,how if SQL calls the relationship fields between related entity bean.
did container handle this task.
example: I have 2 entity bean with CMP(Container Managed Persistence)version 2.0
call Player and Team. every entity bean have own relationship fields and persistence fields.
player has playerId(primary key),name,position,age persistence fields and teams is relationship fields.
team has teamId(primary key),name,city and players is relationship fields.
I know that all persistence fields is declare in own database table but how about relationship fields.
can you tellme, How SQL calls can access relationship fields if relatiosnship fields is not declare in database table.
I use J2EE RI SDK version 1.3
and deploytool .
thank's .thank's for your reply .Now I have another problem
I use J2EE RI from java.sun .I try to follow example in j2eetutorial about CMP Example call RosterApp.ear .
I dont'change anything code inside RosterApp.ear but when I deploy and runclient command thereis syntax error :
java.rmi.ServerException: Remote exception occured in server thread :nested exception is java.rmi.ServerException :exception thrown from bean :nested exception is : java.ejb.EJBException :nested exception is :java.sql.SQLException :syntax error or access violation ,message from server: "you have an error in SQL syntax near "
"leagueBeanTable" WHERE "leagueId" = 'L1' at line 1
in example ,RosterApp.ear use Cloudscape database ,but I try to use Mysql database for RosterApp.ear ,is there any different syntax SQL from Cloudscape to Mysql .
if like that ,so I must edit first SQL calls from Cloudscape to MYSQL . I think because relationship fields is for entity beans only ,so how if mysql database want to access foreign key another table because foreign key isn't declare in databse table.
example : I have 3 entity bean call player, team, league .
1. PlayerEJB have persistence fields name, position, playerId(primary key), cmr fields is teams
2. TeamEJB have persistence fields name, city, teamId (primary key) , cmr fields is players and leagues .
3. LeagueEJB have persistence fields name ,sport, leagueId(primary key), cmr fields is teams
so table is
PlayerEJB <--->TeamEJB<--->LeagueEJB
Player have some finder method call findBySport(String Sport) .
because Sport is persistence fields for LeagueEJB
so PlayerEJB must traverse TeamEJB first before LeagueEJB
EJB QL : SELECT distinct object(p) FROM Player (p) IN (p.teams) AS t
WHERE t.league.sport = ?1
I know that Container will translates EJB QL to SQL calls ,but default is only for cloudscape database and I use for MYsql .
so can you helpme how to query method findBySport(String sport) to Mysql calls .
thereis no foreign key between table in database table there is only Relationship fields in entity bean. -
Bean-managed transaction with EJB 3.0
Hi,
I try to get a bean-managed transaction example running with EJB 3.0 under GlassFish v2ur2.
In order to demarcate the scenario I have to get me the UserTransaction which I get from the SessionContext. I would like to use it then like: UserTransaction ut = context.getUserTransaction();
I tried to get the SessionContext with the help of the EJB method setSessionContext which should be called by the container after instance creation.
However, setting a log output into that method does not show any call of this method.
So, how can I get this method called or is there another way to get the SessionContext for the UserTransaction to work ?
Are there any good and fully implemented examples for bean-managed transactions ?
Thanks for your help.
RegardsI found the solution for that my SessionContext was NULL and I could not use the UserTransaction.
The reason for it is that I injected the EJB with @EJB into my servlet and did a MyBean mybean = new MyBean();
That leads to a SessionContext which is NULL within my EJB.
If I use it without instantiating it it works fine.
Again, thanks for your help. At least it pointed me into the right direction.
Regards -
Bean or Container Managed Persistence
Hi,
I've been reading up on the Sun J2EE tutorial. One of the topics there is bean or container managed persistence. It states that container managed is easier for developers and allows for more portability. The class codes are much smaller compared to bean managed and developers need not worry about database queries.
Can anyone share their experiences on this? Any 'Real World' advantages and disadvantages? Is there a guideline I can follow when to use bean or container managed persistence?
Thanks,
-RayThat seems like an obvious flaw. So why was it even considered in the
J2EE framework? I mean wouldn't the J2EE architects immediately realize
that? Just doesn't make sense to me why there's even a tutorial or books
for it. What does it suppose to solve then??I know what you mean... again, I think they thought it looked good on paper.
And it gets worse...
Before you use Entity Beans you must be absolutely sure that there will never be another app that accesses the underlying table that doesnt use the EntityBean to do it... For example a C++ App that accesses the tables directly... otherwise you have to set a flag in the App Server that states that basically every time a property on an EntityBean is read the Bean will have to RE-READ the beans state from the database!!
Some things look really good, from an OO perspective, but dont work really well in reality. Sure Entity Beans look really good in the example program in the tutorial, but what happens when you multiply the number of entity beans by 1000, 100,000, or more? Just think of the CPU, and Memory overhead for instantiating all those objects!
There are people out there who believe that using Stored Procedures is a no-no because in their minds it puts "Business Logic" on the database and not the App Server...To this I say... BUNK... Ive seen several instances where by simply moving a set of queries from the App Server to a stored procedure on the database, allowed for a 10-20 times performance gain because of the elimination of network IO. In one instance I saw a query go from 3 hours execution time on the App Server to under 10 minutes on the database... But stored procedures arent OO...
So IMHO before you use EntityBeans at all... be absolutely sure you understand all of the ins-and-outs of doing so. -
Bean Managed Entity Beans(EJB) using Tangosol.
I am trying to use Bean Managed Entity Beans using Tangosol Coherence.
The entity bean is currently configured in the weblogic-ejb-jar.xml with:
<max-beans-in-cache>200</max-beans-in-cache>
In the public void ejbLoad() method, I am calling the Tangosol Cache to load the entity bean.
If we have have more that 200 request coming at the same time, we get an OutOfMemoryError exception.
Is there anyway to overcome this limitation by somehow having the ejb cache to use the tangosol cache?
Thanks for any help in advance.
KrishanSo far, it's not immediately obvious to us what the exact problem is that you are seeing. It sounds like the VM would be using at least 200MB just for the application server's own internal cache, for example, and that you are also using Coherence within the application server to provide additional caching.
If possible, we should set up a phone call with you and your team, and we could get an engineer from our end to walk through your specific use case with you, so that we could understand what the exact technical challenge(s) is(are) in this particular application.
Peace.
p.s. You can email [email protected] directly to schedule a call. -
Container-managed persistence Entity bean
WE use a container-managed persistence Entity bean. To handle the state synchronization between the object & the database, what must WE do?
Thanks in AdvanceThat's the container's job. You can use the commit option A/B/C to control how the DB and objects are synchronized.
-Scott
http://www.swiftradius.com -
Can i call Bean managed EJB with transaction attribute Required New
I am calling a BeanManaged EJB which has a transaction attribute
set to Required New from a container managed bean. Does it create a new transaction
other than the Bean managed transaction. Do i really need a required new field
transaction attribute.All i need is user controlled transaction.Do i need to set
the transaction aatibute.
Thanks
Krish.
Hi Krish,
The question does not make much sense.
I would suggest that you set all your tx settings to "Required" unless you
have a specific reason to do otherwise, and in those few instances that you
have a specific reason to do otherwise, then change it in just those places.
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"KRISH" <[email protected]> wrote in message
news:[email protected]..
>
> I am calling a BeanManaged EJB which has a transaction attribute
> set to Required New from a container managed bean. Does it create a new
transaction
> other than the Bean managed transaction. Do i really need a required new
field
> transaction attribute.All i need is user controlled transaction.Do i need
to set
> the transaction aatibute.
>
> Thanks
>
> Krish.
>
-
You don't really give enough information to answer the question. Probably the most important questions are the coarseness of the database activity, the need for remoteability, and the need for a component and security model.
The short, rule of thumb, answer is that Entity Beans (regardless of BMP vs. CMP) almost always have a significant performance penalty. You should choose Entity Beans because you need/want the features of Entity Beans, not because of performance.
David
Maybe you are looking for
-
Can't Install iTunes on my laptop with Windows Vista...PLEASE HELP
I've received error messages every time I try to download iTunes. I've tried the troubleshooting steps on Apple's website but no luck.
-
ACR PSD files - larger file size and max compatible
When using ACR > Save As to save a bunch of PSD files from raw files the resulting PSD file sizes are larger. for example: if I output and save from ACR directly to a folder as a PSD, I'm seeing the file size at 63.1 MB If I open the raw file to PS a
-
URGENT: How to encript a parameter in a URL?
Hello All, My requirement is when I click on a link(which is not created on an OAF page), I want to call a seeded page which displays the data corresponding to an Id passed. I'm creating the link using html code. The seeded page is ArticleDetailsView
-
Trying to use FCI in combination with an RMS template. but when i go to create the file management task and try to add the RMS Encrytion action the select template is greyed out and in the box it says unable to retrieve RMS template. Not sure what i
-
Just got my Macbook (Love black) have 2 concerns thus far. 1) The left shift button kinda jams a little, but it now seems fine after a couple of hours of use, is this typical? 2) My bigger concern is the track pad. It works fine but looking at the su