Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Storing massive sized field into an entity bean  RSS feed

 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to store a field into a EMP 2.0 Entity Bean, whose size is in the order of a MB's(20-50 MB).
When i do that i get the following error

2003-03-03 14:00:19,671 ERROR [org.jboss.ejb.GlobalTxEntityMap] Store failed on entity: xyz/units
javax.ejb.EJBException: Store failed; CausedByException is:
Connection is broken
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:94)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:589)
at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:458)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:388)
at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:708)
at org.jboss.ejb.GlobalTxEntityMap.syncEntities(GlobalTxEntityMap.java:117)
at org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapCleanup.beforeCompletion(GlobalTxEntityMap.java:185)
at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1394)
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:364)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:251)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:92)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
java.sql.SQLException: Connection is broken
I am using JBoss 3.0.6, CMP 2.0
Can somebody let me know what am i doing wrong ? I am pretty sure it is to do with the xml settings in one of the xml files.
I have ejb-jar.xml in my .EAR and i am using that only, I dont have a specific jboss.xml or jbossjdbc.xml .. do i have to do any specific changes in those files ? If yes can you guys please point me to a document.
TIA
Meka Toka
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any reason why you are saving such a large BLOB into the database? Perhaps there is another way...
Simon
 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Yes there is a reason for storing that. That field holds the scanned results of certain parameters on the client machine.
The thing is, the object is passing from client to server, but it fails on store.
Earlier i was trying to store a java object which is serializable. It had some Vectors in it.
Now it is huge because that is a merged object of alot of machines.
I am using HyperSonic database that ships with the JBoss, is there a problem with the database ? Cuz when i test storing about 20-30 k it still fails ?
I thought may be the java object has limitations and so broke down the object into Vectors and tried, but still no luck.
Any ideas are most appreciated
Thank You
Meka Toka
[ March 03, 2003: Message edited by: meka toka ]
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't store that in a database. Instead, store it directly in the file system and store the URL in the database. There is absolutely no reason to store a BLOB of that size.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!