[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

snau2005 do-not-reply at jboss.com
Fri Apr 20 07:36:08 EDT 2007


anonymous wrote : anonymous wrote : use oci driver (in case with oracle)
  |   | 
  | is it helpfull ?? do you think that oci driver is so faster then thin driver ?
  | 
I'm not sure in case of perfomance (thin driver had some bugs and i switched to oci (but this was long ago, now maybe thin also ok)

anonymous wrote : of course i use Thread, Thread will be created on client side and all of them calls my stateless session beam method, i tried to create 50 Threads, and my pc is enough strong, it has 16 CPU, and 16 GB Memory, Sun Solaris,
  | 
As I unterstood, every client Thread creates (calls ejb witch creates TR) his own transaction? so in reality you have 10000 transactions with one insert statement, thats of cource i think should be slow. In my case I called only one time ejb , so 1 TR was created then 8 Threads started to persist and flush.


anonymous wrote : and i cant found any documentation about stored procedures into ejb 3.0, can anybody show me it ?
  | 

Example to call stored function 
		try {
  | 			HibernateEntityManager hem = ((HibernateEntityManager)em.getDelegate());
  | 			Session session = hem.getSession();
  | 			Connection connection = session.connection();
  | 			
  | 			CallableStatement proc = connection.prepareCall("{ ? = call getNBVZSInfo(?, ?) }");
  | 			proc.registerOutParameter(1, Types.VARCHAR);
  | 			proc.setString(2, traderCode);
  | 			proc.setString(3, userName);
  | 			proc.execute();
  | 			result = proc.getString(1);
  | 			
  | 			log.info("Info: " + result);
  | 		} catch (Exception e) {
  | 			log.error("getNBVZSInfo, error: " + e);
  | 		}

and oracle functions looks like:

  | FUNCTION getNBVZSInfo(traderCode varchar2, userName varchar2) RETURN varchar2 is
  |  rez varchar2(4000);
  |  begin
  | 
  |   rez := 'hoho and the bottle of rum';
  |   return rez;
  | end;

But again if bussines logic alows procedure to store 10000 , so one ejb call also can store 10000 in one call and if you will call oracle procedure 10000 time thats also will be slow.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039229#4039229

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039229



More information about the jboss-user mailing list