Multi session over Entity bean
Hi All,
How an Entiry bean will be persistent over multi sessions.
Any help will be appreciated
Entiies are backed by some sort of database. What exactly do you mean by "multi sessions?"
Similar Messages
-
How many ejbCreate() can be in Session and Entity Bean???
Hi,
How many ejbCreate() method can be in a Session and Entity
Bean???
How many can be in Stateless and Stateful SessionBean???
How many can be in CMP and BMP SessionBean???
Thanks,
JavaCrazyLoverHow many ejbCreate() method can be in a Session
ion and Entity
Bean???For Stateful Session Beans and Entity Beans, as many as you'd like.
Stateless Session beans can only have one, since their ejbCreate methods can not take any parameters.
>
>
How many can be in CMP and BMP SessionBean???If you mean CMT/BMT(Container-Managed transactions / Bean-Managed Transactions), then
the answer is the same. The create method requirements are independent of the transactional nature of the bean.
If you really mean CMP/BMP(Container-Managed Persistence / Bean-Managed Persistence) , it doesn't apply to session beans, only entity beans. However, even for entity beans, CMP vs. BMP has no bearing on the rules regarding # of create methods.
--ken
>
>
Thanks,
JavaCrazyLover -
Session vs Entity Bean in Business Layer???
Hi,
I am developing a Hotel Management System project, I am planning to use the following softwares for it:-
Presentation - JSP
Web controller - Action class(Struts)
Business Layer - Session Facade( Stateless Session Bean)
DAO - Hibernate
DB - Oracle 9i
Model - ValueObject
This is what i have decided to use to build the flow of the application.
I have an idea about JSP,STRUTS,HIBERNATE & ORACLE. Since i have used it before.
But in the case of business layer, i have doubt (since i am going to use EJB for the first time) whether to use a Session bean or entity bean where i will be writing my own queries(Stored proc.) as well as i will be using the predefined functions of hibernate to store the data .
I also want to know whether i need to go for StatefullSB or Stateless SB if i use a sessionfacade(which i have planned to do)??
When in what situation i need to for this approach???
Please provide an answer for this & pls. do mention my flow is right or
wrong??
Excepting ur valuable thoughts..
Thanks,
JavaCrazyLoverHi
I also want to know whether i need to go for StatefullSB or Stateless SB if i >use a sessionfacade(which i have planned to do)??
When in what situation i need to for this approach???That depends on how your application will be used.
Stateless and Statefull session bean are different.
If you want to keep informations such as shopping cart, you can use Statefull.
If you plan to have a huge number of request at time, Stateless can be faster.
You can also keep your information such as shopping cart in the session scope of your web jsp tier. (if you use only web client.)
In your case, i would choice, Stateless.
Anybody, correct me if i'm wrong.
Tks. -
Choosing session vs. entity bean
I am working on a web application that (among other things) needs to occasionally persist data in a database. I am using a DBUtil class that actually gets the DB connection and makes the update - all i do is pass it a string that represents the SQL statement. I want to create an EJB that can store a queue of statements (passed from the web classes) and periodically send them off to another EJB that will use the DBUtil class to do batch updates on the database.
I need to determine which types of EJBs to use for the 2 beans. If the first bean (the one that queues up the SQL statements and periodically sends them along) is only going to be accessed by one client, should I just use a session bean? Or do I need to use an entity bean because the bean needs to 'sleep' between its periodic call to the other bean?
The second bean simply waits to receive the set of SQL statements from the first bean and then passed them along to the DBUtil class for insertion into the DB. I was going to make this a session bean, but it seemed odd to have an entity bean calling a session bean (if the first bean should indeed be a entity bean). Are there any reasons why the second bean should be an entity bean instead of a session bean.
Thanks.Hi,
I think the design to use EJBs for implementing a kind of service which accumulates a set of db statements and then update the db does not call for the use of EJBs. This service could be implemented using simple java classes easily and then when a predefined threshold is reached, you can call the DBUtil class to update the db. In case you want to de-couple the task of updating the db then, on reaching the threshold post a message to a queue and then write a MDB which listens for this and it calls the DBUtil to do the update.
If you want to run all your db statements in a context of a transaction, you can use a stateless session bean to call the DBUtil, but again the service has to be in a java class.
Otherwise I dont see the use of EJBs, especially two beans one calling the other as stated by you as a good design.
Regards,
Naveen -
[HOWTO] JSF + Session Facade + Entity Bean (EJB3)
I'm trying to find a tutorial that shows the advisable way to use JSF with EJB 3 entity beans using the Session Facade pattern (?), but the only tutorials around show very basic usage of JSF (validation, conversions etc.).
The only thing that is close is this: http://forum.java.sun.com/thread.jspa?threadID=5122284 but still not what I'm looking for.
Is there any documentation available out there..?
Message was edited by:
HakelRausdHi,
I updated the online doc in blueprints solutions catalog with a small explanation of using JSF with EJB Session Bean at https://blueprints.dev.java.net/bpcatalog/ee5/persistence/ejbfacade.html
I will add an image soon too. The basic idea for JSF and EJB3 programming model is
JSF Page --> JSF Managed Bean(backing bean) --> Session Bean --> Java Persistence Object.
In general, ther would be several JSF pages,and several JSF Managed Beans, and several Java Persistence Objects, but fewer Session Beans. The Session Bean would be expected to be shared and accessed by several managed beans with with Session Bean serving as a facade to the Java Persistence Objects, so there would be few Session Beans.
The Session Bean would usually be a local Session bean and would only be remote if-and-only-if you wanted RMI-IIOP access. Usually web components like Servlets and JSF Managed Beans use local access to the Session Beans and the access is within the same VM, no remoteness.
Most of the time, the Session Bean would be a Stateless Session Bean, and would not be a Stateful Session Bean.
hth,
Sean -
Creating a Session & Entity bean in Weblogic
Hii javaities
I am new 2 EJB , and i want 2 create a apllication using EJB.
I want 2 create a session , and entity bean in WEblogic.
Can anybody help me i this
Or if u have some good links , plz pass it 2 me.
Thanking in anticipationhttp://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html
http://www.oracle.com/technology/sample_code/tech/java/j2ee/designpattern/businesstier/sessionfacade/readme.html
google search for more. -
Problem with getting Entity Beans refreshed within Session bean methods
I hav following code in session and entity beans:
Session bean pseudo code: (PrimaryKey is primary key class for the entity
bean referred here, and MySessionHome is the home interfac class for this
session bean).
public class MySession implements SessionBean {
// This method is present in remote interface class as well.
public void methodA(PrimaryKey pk) {
// code to find entity bean by primary key specified.
update the entity bean, and mark it as isModified.
public void methodB(PrimaryKey pk) {
// code to find entity bean by primary key specified.
do something.
public void methodC() {
MySessionHome sessHome = code to lookup sessionhome from JNDI.
MySessionRI sess = sessHome.create(); // MySessionRI is the remote
interface class for MySession
PrimaryKey pk = new PrimaryKey(params);
sess.methodA(); // LINE ABC1
sess.methodB(); // LINE ABC2
all the entity and session bean methods have required as the TX attribute.
In methodB() on LINE ABC2, the entity bean obtained by findByPrimaryKey does
not reflect the changes made in call to methodA() on LINE ABC1.
Now if I change the LINE ABC1 and LINE ABC2 to
methodA(); // LINE ABC1
methodB(); // LINE ABC2
in this case the entity bean obtained in methodB() has the changes made in
methodA().
Any idea why this is happening?Hi ad13217 and thanks for reply.
I'm sorry but my code is like this:
javax.naming.Context ctx=new javax.naming.InitialContext();
arguments was an error on copy, but it doesn't work.
Thanks
Fil -
Flow of sessiob bean and entity bean
Hi All,
Can any one help me how is the flow of session and entity beans i.e
What method is called first and what method is called next.
There are so many methods like create(),ejbcreate(),
ejbActivate(),ejbPassivate(),ejbDelete() etc.
What is the flow of these methods and when they are called.Hi vasudulla,
If you can, go to the bookstore and look for the book:
Entreprise JavaBeans 3rd Edition by Richard Monson-Haefel.
In the Appendix B, you can see the State and Sequence Diagrams, all the things you want to know about the Flow.
--Paul. -
Urgent!Poor performance in Entity beans
we're using Weblogic 5.1, Oracle 8i.(both installed in Solaris 5.8) We
found that the performance of our entity beans is poor, the reason we
guess is because when we issue a select statement, the jdbc, at the same
time, issue a update statement, that's why the response time is slow.
(By the way,we use oracle thin driver to connect.)
I know we can set autocommit to false but our beans are cmp,so we can't
set properties in connection pool.What can we do then?Can we set any
transaction attributes in our ejb,so we can solve our problem?
Thx!
PeteA few issues with the linked article:
" 1. Where ever possible, using Entity bean with CMP over Entity bean with BMP, will ensure increase in performance... Tuned CMP entity beans offer better performance than BMP entity beans."
Bull. Every time I have seen some statement like the above it has never contained any associated proof nor explaination of how a container vendor's code can interact with a DB any better than mine.
The only means by which a container vendor can generically improve the performance of DB interactivity is to not do it, namely by caching the data and monitoring modification. This is rarely used due to mitigating factors such as any case where the container does not have sole access and omniscience over the DB.
"Moving towards the CMP based approach provides database independence since it does not contain any database storage APIs within it."
Ahh yes, lets trade in EJB container independence for database independence. It's interesting that the biggest proponents of CMP (and the ones who pushed it into the spec) are the biggest container vendors. Database storage APIs??? Perhaps JDBC and "select * from USER where..." are somehow viewed as database specific. -
Calling Stateful & Statless Methods from the same Entity Bean[EJB2.0]?
Dear All,
We using EJB2.0........
Regarding segregation of stateless and stateful methods..These methods are defined in Session bean.Now my question is
Is it a good practice to call Stateful and Stateless business methods from same single entity bean("EntityBean") defined at program level by extending MainBean..
The architecture is like
public class EntityBean extends MainBean
Public Methodxyz
stfobj.MakeConn();
stlobj.getXyz();
stfobj.CloseConn();
Public Class MainBean{lookup("stl");lookup(stf) ;stl_obj=home.create;stf_obj=home.create()............}
ejb-jar.xml
{ <session>
<description>Entity Bean Employee Example</description>
<ejb-name>stl</ejb-name>
<local-home>com.packg.stlHome</local-home>
<local>com.packg.stl</local>
<ejb-class>com.packg.stlBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<description>Entity Bean Employee Example for stateful</description>
<ejb-name>stf</ejb-name>
<local-home>com.packg.stfHome</local-home>
<local>com.packg.ejbeans.stf</local>
<ejb-class>com.packg.stfBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<description>Session bean for System Parameters</description>
<ejb-name>SysParam</ejb-name>
<local-home>com.packg.Home</local-home>
<local>com.packg.Param</local>
<ejb-class>com.packg.Bean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<ejb-local-ref>
<ejb-ref-name>stl</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.packg.stlHome</local-home>
<local>com.packg.ejbeans.stl</local>
<ejb-link>stl</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>stf</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.packg.stfHome</local-home>
<local>com.packg.stf</local>
<ejb-link>stf</ejb-link>
</ejb-local-ref>
</session>
Thanks !!
Edited by: user9052593 on Jun 18, 2012 2:20 AM
Edited by: user9052593 on Jun 18, 2012 2:25 AMAll Business logic resides in session beans[Stateful or Stateless]..For stateful beans we are opening connections in entity bean ,calling business methods and closing connection in entity bean itself..Problem is
I am doing lookup for stateful and stateless both since both objects are called by extending MainBean in same entity bean else will give null pointer exception..
So whenever i call a Stateful or Stateless method from entity bean Which ultimately extends/calling MainBean and thereby calling home.create methods of stateful and stateless both..creating objects..Is this way fine or it will affect the performance?
Do i need to segregate the Calls/invokation to Stateful / Stateless methods at entity bean level too..
For ex:- Whenever i call Methodxyz() method ..at the same time it create 2 objects as its extending MainBean...i want to extend/create 1 object either of stateful or stateless one for stateful and stateless methods call respectively..
See the code in entity bean is like
public class EntityBean extends MainBean
Public Methodxyz
stfobj.MakeConn(); call to stateful method defined in stateful bean
stlobj.getXyz();// call to stateless method defined in stateless bean
stfobj.CloseConn(); call to stateful method defined in stateful bean
------------------------------------------------------------ -
DBMS connection speed: Session vs Entity
Environment: WLS6.1 SP3, W2K, Oracle 8.1.7, OCI Driver
Hi,
we are experiencing performance problem when getting a connection from a
pool.
Getting a connection from a stateless session bean takes 300-500ms whereas
it takes 15ms
from an entity bean (local). Both session and entity beans are deployed in
the same ear.
In both cases we're getting the datasource using the following code snippet
Properties p = new Properties();
bla bla bla ...
Context ic = new InitialContext(p);
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/XXX");
and
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/YYY");
When getting the connection, we are experiencing the speed difference
described above.
connection conn = ds.getConnection();
Why do we have this difference? We have the reference to the datasource
already.
There is no further JNDI lookup. Is there something we are missing?
Thanks
Arnaud
Entity descriptor
<resource-ref>
<res-ref-name>jdbc/XXX</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
</resource-ref>
WLS specific
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/XXX</res-ref-name>
<jndi-name>jdbc/MyDataSource</jndi-name>
</resource-description>
</reference-descriptor>
Session descriptor
<resource-ref>
<res-ref-name>jdbc/YYY</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
</resource-ref>
WLS specific
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/YYY</res-ref-name>
<jndi-name>jdbc/MyDataSource</jndi-name>
</resource-description>
<ejb-local-reference-description>
<ejb-ref-name>ejb/XXX</ejb-ref-name>
<jndi-name>ejb/XXXLocal</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>Hi Arnaud,
"Arnaud Benjacar" <[email protected]> wrote in message news:[email protected]...
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="5" MaxCapacity="10" Name="myPool"
Properties="user=M594;password=M594;dll=ocijdbc8;protocol=oci8"
Targets="ilimdev" URL="jdbc:oracle:oci8:@ilimdev"/>
<JDBCTxDataSource JNDIName="jdbc/MyDataSource"
Name="My Tx Data Source" PoolName="myPool" Targets="ilimdev"/>This configuration is far from the best performing one. I suggest you
to change it to:
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
Properties="user=M594;password=M594;dll=ocijdbc8;protocol=oci8"
InitialCapacity="20" MaxCapacity="20" Name="myPool"
LoginDelaySeconds="1" RefreshMinutes="99999"
ShrinkPeriodMinutes="5" ShrinkingEnabled="false"
TestConnectionsOnReserve="true" TestConnectionsOnRelease="false"
TestTableName="DUAL"
Targets="ilimdev" URL="jdbc:oracle:oci8:@ilimdev"/>
This configuration will perform better and will not spend time recreating
connections and will require less synchronized operations inside the
pool.
BTW, in your code sample you look up two datasources. Are they bound
to different pools?
Regards,
Slava Imeshev
>
>
>
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]...
Hi Arnaud,
Could you post an extract from config.xml in part of the connection
pools and datasources? I'm asking because the configuration
you have may be not tailored to best performance.
Regards,
Slava Imeshev
"Arnaud Benjacar" <[email protected]> wrote in message
news:[email protected]...
Environment: WLS6.1 SP3, W2K, Oracle 8.1.7, OCI Driver
Hi,
we are experiencing performance problem when getting a connection from a
pool.
Getting a connection from a stateless session bean takes 300-500mswhereas
it takes 15ms
from an entity bean (local). Both session and entity beans are deployedin
the same ear.
In both cases we're getting the datasource using the following codesnippet
Properties p = new Properties();
bla bla bla ...
Context ic = new InitialContext(p);
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/XXX");
and
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/YYY");
When getting the connection, we are experiencing the speed difference
described above.
connection conn = ds.getConnection();
Why do we have this difference? We have the reference to the datasource
already.
There is no further JNDI lookup. Is there something we are missing?
Thanks
Arnaud
Entity descriptor
<resource-ref>
<res-ref-name>jdbc/XXX</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
</resource-ref>
WLS specific
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/XXX</res-ref-name>
<jndi-name>jdbc/MyDataSource</jndi-name>
</resource-description>
</reference-descriptor>
Session descriptor
<resource-ref>
<res-ref-name>jdbc/YYY</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
</resource-ref>
WLS specific
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/YYY</res-ref-name>
<jndi-name>jdbc/MyDataSource</jndi-name>
</resource-description>
<ejb-local-reference-description>
<ejb-ref-name>ejb/XXX</ejb-ref-name>
<jndi-name>ejb/XXXLocal</jndi-name>
</ejb-local-reference-description>
</reference-descriptor> -
Implementation of Entity Beans
Hi..
Can anyone help me in my doubts?
Whenever i have an entity bean object , and say at given instant of time more tan one user wants to update the data that the entity bean represent.
Take a particular case:
One user calls an entity bean modifies itzz state say one field but doesn't commit , now at the same time some other user modifies the state say another field and commits it.
What will happen to the modification made by the first user?are they lost or they are also commited with it.Now the first user undo itzz changes and commit it . What will be the state of the entity bean?
Thankzz in advance !!
SomiljYou first need to understand why two users would update the same row at the same time, and then define what you wish the expected results to be (the behaviour of locking all other users whilst one user updates data may be what you require).
Once you understand your desired behaviour, you can then consider how isolation levels and transactions help achieve that behaviour.
Loosely speaking, you can consider a transaction as an atomic operation on data in a database (enterprise resource), and Isolation levels as how that data may be manipulated when held in a transaction.
You can set isolation levels per entity bean method (e.g. SERIALIZABLE or REPEATABLE_READ) and indicate, per session bean method how it partakes in any transaction (e.g.TX_REQUIRED or TX_NOT_SUPPORTED).
For example, suppose you need to set some data in a row, perform a lot of other calculations controlled by a session bean, using other session and entity beans, then allow that data to be changed by someone else. To do so, it is likely that you would include all entity/session beans in a container managed transaction with the isolation level for the data set to serializable. Here the data would be 'locked' until the complete operation had finished.
Suppose you only need to lock the data for a small part of the overall computation, then you could choose to use several container managed transactions, or place the update of data outside a transaction, or use explicit Bean Managed Transactions (where the code you right manages the transaction).
Adam
Hi..
Can anyone help me in my doubts?
Whenever i have an entity bean object , and say at
given instant of time more tan one user wants to
update the data that the entity bean represent.
Take a particular case:
One user calls an entity bean modifies itzz state say
one field but doesn't commit , now at the same time
some other user modifies the state say another field
and commits it.
What will happen to the modification made by the first
user?are they lost or they are also commited with
it.Now the first user undo itzz changes and commit it
. What will be the state of the entity bean?
Thankzz in advance !!
Somilj -
Timeout of session / entity bean
Hi all
We are facing "RollbackException: The transaction has been marked for rollback (timed out)" excpetion. please help us in resolving this.
Here is problem description.
Code Description:
Step1: Action class calls Session bean
Step2:Session Bean does three things
A. Reads various value from database and write it to fileOutputStream
B. Generate a Sequence number using Sequence
C. Call create method of Entity Bean by local reference to insert the created file (in step 2A) in database as blob
As per our observation session bean takes around 20-30 sec in processing 2A and 2B.
But at 2-C, code raises following error
TariffDocumentBlob is the Entity Bean
TariffSessionEJB is the Session Bean
javax.ejb.CreateException: Error creating EntityBean: RollbackException: The transaction has been marked for rollback (timed out)
05/10/24 16:04:01 at TariffDocumentBlobLocalHome_EntityHomeWrapper397.create(TariffDocumentBlobLocalHome_EntityHomeWrapper397.java:1135)
05/10/24 16:04:01 at com.derc.rims.businessservice.businessinterface.TariffSessionEJBBean.createTariffBlobMasterRecord(TariffSessionEJBBean.java:102)
05/10/24 16:04:01 at com.derc.rims.businessservice.businessinterface.TariffSessionEJBBean.uploadTariff(TariffSessionEJBBean.java:76)
05/10/24 16:04:01 at TariffSessionEJBLocal_StatelessSessionBeanWrapper96.uploadTariff(TariffSessionEJBLocal_StatelessSessionBeanWrapper96.java:80)
05/10/24 16:04:01 at com.derc.rims.businessservice.businessinterface.BISessionFacadeEJBBean.delegate(BISessionFacadeEJBBean.java:534)
05/10/24 16:04:01 at BISessionFacadeEJB_StatelessSessionBeanWrapper4.delegate(BISessionFacadeEJB_StatelessSessionBeanWrapper4.java:101)
05/10/24 16:04:01 at com.derc.rims.action.tariff.CalculateTariffAction.execute(CalculateTariffAction.java:75)
05/10/24 16:04:01 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
05/10/24 16:04:01 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
05/10/24 16:04:01 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)05/10/24 16:04:01 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)05/10/24 16:04:01 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)05/10/24 16:04:01 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)05/10/24 16:04:01
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)05/10/24 16:04:01 at
oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)05/10/24 16:04:01 at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)05/10/24 16:04:01 at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)05/10/24 16:04:01 TRANSACTION OVER05/10/24
16:04:01 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
05/10/24 16:04:01 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
05/10/24 16:04:01 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
05/10/24 16:04:01 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
05/10/24 16:04:01 at java.lang.Thread.run(Thread.java:534)
com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: timed out at
BISessionFacadeEJB_StatelessSessionBeanWrapper4.delegate(BISessionFacadeEJB_StatelessSessionBeanWrapper4.java:159)
at com.derc.rims.action.tariff.CalculateTariffAction.execute(CalculateTariffAction.java:75)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
Nested exception is:java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
java.lang.Exception: No Exception - originate from: at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:931)
at BISessionFacadeEJB_StatelessSessionBeanWrapper4.delegate(BISessionFacadeEJB_StatelessSessionBeanWrapper4.java:159)
at com.derc.rims.action.tariff.CalculateTariffAction.execute(CalculateTariffAction.java:75)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.Exception: No Exception - originate from: at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:930)
... 17 more
We have tried out .....
- Making new Enity Bean
- changing timeout of session bean by changing it in properties
<session-deployment name="TariffSessionEJB" timeout="300" >
We are using Oracle 10g application Sever and Oracle 10.1 database.Assuming you are using either 9.0.4 or 10.1.2, please note that default transaction time out is 30s and you can change that <transaction-config> element in server.xml. This is specified in millliseconds
-Debu -
Problems accessing fields in a CMP entity bean from a session bean
Hello everybody,
I'm getting the next problem: when I try to access a field in a CMP entity bean that I have instantiated from a session bean (trhoug entitybean.getNameOfField), I get the error "the entity bean does not exist in the database".
This entity bean is accessing a table in an external database (not the DB of the WAS), but I know that it's getting the correct data from the table, sinceĀ I check the entitybean.size() and the entitybean.findByPrimaryKey(), and I get the right information. For some reason, the only thing that it doesn't work in the entity bean are the getter/setter methods (I created them automatically after having created the entity fields).
I access the entity bean through its local interface...
I know it's really difficult to give an answer with so few details, but... does anybody think I forgot something important to configure??
Thank very much in advance!!
Isidrogetter and setter methods for cmp-fields are abstract.
getter and setter methods for cmr-fields are abstract.
"John Lee" <[email protected]> wrote:
>
Hi:
Which method in a CMP Entity bean should be abstract? just only SetXXX
and
GetXXX?
Thanks!
John Lee -
How does a session bean find entity beans in EJB 3.0
Hi,
I am new to J2EE. I have difficulties finding out how a session bean locates the entity-manager for a group of entity beans. I understand that the entitymanager in the session bean is injected using the PersistenceContext annotation, but I dont see how it locates the intended EntityManager (which could be on another server).
I realize this is probably trivial, but can any of you guys tell me what I am missing?
Best Regards
ThomasHi Thomas,
Good question. Each @PersistenceContext annotation is associated with a single Persistence Unit. A Persistence Unit is defined either at the module level or at the .ear level. Each persistence unit has a name associated with it. The unitName() attribute is used to map @PersistenceContext to the associated PersistenceUnit. Since the most common case is that an application will only define one persistence unit, the spec requires that if the unitName() is not specified, it will automatically map to that single persistence unit.
--ken
Maybe you are looking for
-
Can any one please advise how to fix this problem when i open preferances and go to mail so i can change passwords and so on this is what i get (You can't open Mail, Contacts & Calendars preferences because it doesn't work on an Intel-based Mac.) i h
-
This is the best method to install a new version of Studio!
Do it cleanly. By this I mean create a new fresh startup disk for the install of Studio. Whether for Studio 1 ,2 or 3, trust me. this method will get you to a really stable FCS system. 1. Backup everything you want to keep if you're using the same dr
-
Adobe illustrator cc, start for seconds then it closes..
Hello, i recently buy Adobe photoshop cc and lightroom (photography plan) and i download illustrator.. the problem is, photoshop cc and illustrator starts then it closes.. 5 sec probably.. i need help, i need to do some homework on illustrator and wo
-
CUA: Distribute users from central to specified child systems
Hello! I've a question concerning CUA: I've added two new systems to our CUA. Now I want to destribute the users of the central-system to the new child-systems accompanied by assigning a specifed role for the child-systems. Unfortunately, the user ma
-
hi everybody! my problem is outofmemoryerror when and why does it start? an error like this is dangerous for my java applications? <<<<<<<<<<<<<<<<<<<< how and why is right to use the following methods?: System.gc() Runtime.gc() <<<<<<<<<<<<<<<<<<