[jboss-user] [EJB 3.0] - Large data insert generates no line at database

2006-10-11 Thread abra20
Hello!

Im facing a problem and Im completely lost at it.


I get the file through JSF component.
What I have to do is read the file, line by line instantianting a new Entity 
that will have 
this String as an attribute. So, I create a List of the entities created.

List list = new ArrayList();
while((line=reader.readLine)!=null)
{
   EntityB b = new EntityB();
   b.value = line;

   list.add(b);
}

Also, I have another Entity that will receive this List.

EntityA a = em.getEntityA(id);
a.setBEntities(list);

Finally, I try to merge EntityA, as I use cascade, EntityB will also be 
persisted.

em.merge(a);


First problem:
What is the best way of passing the file or its content to my 
SessionBean(Stateless)
so I can iterate the content and persist it?

What Im doing is read the UploadedFile (Adf Component) and write the content to 
a java.io.File,
so I can pass it to the SessionBean but I dont think this is a good thing 
because these uploaded
files are about 50 - 150 thounsand lines.

Second problem:
How do I persist those thousands of entities objects I created?
I call em.persist and none is persisted.
I tried to insert through native query and also no line is inserted.

However when I try a smaller File with 15 thousand lines, the task is 
successfully done.


Appreciate some help!

Thanks!


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977514
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Reflection on EJB session bean on client side

2006-08-30 Thread abra20
That was it!

As Im using version 4.0.4, it is in deploy/naming-service.xml

Thank you!

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968364
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Reflection on EJB session bean on client side

2006-08-29 Thread abra20
Hi!

I have the same problem and I couldnt get things working.

When I typecast the object returned by the lookup (a Proxy),
I get ClassCastException and I really don't understand why.

The callByValue is set true.

And, the only place where my interfaces are is in the ejb-jar
which is deployed inside an ear file.

I also have a ejb-client jar with only the interfaces and it
is located at server/default/lib so JBoss can load the interfaces.

What am I doing wrong?

Thanks

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968219
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user