Re: Geronimo 2.1.1 MDB Performance Question

2008-10-02 Thread Mario Kofler
as a supplemental, i was monitoring the database connections.

regards,

mario.

2008/10/2 Mario Kofler <[EMAIL PROTECTED]>:
> hello,
>
> i am afraid i never solved the problem. the problem also with me still
> existed after all the different solutions that were suggested
> throughout this thread.
>
> i also never opened a jira to this problem (blame me).
>
> i accepted that the geronimo just works with 10 message driven bean
> connections at a single point in time at the moment.
>
> sorry that i cannot give you a better solution,
>
> regards,
>
> mario
>
> 2008/10/2 my_forum <[EMAIL PROTECTED]>:
>>
>>
>>
>> the666pack wrote:
>>>
>>> hello,
>>>
>>> i have a question regarding MDBS in Geronimo 2.1.1
>>>
>>> i bombard the server with a high amount of mdb requests, the mdbs write
>>> tuples to a database. so although my database connection pool maximum is
>>> 20 i realize that with mdbs the pool is just utilized with 10 connections
>>> to the database, no matter how many requests are coming in.
>>>
>>> does somebody have an idea what might be the reason for this behaviour?
>>>
>>> thanks a lot,
>>>
>>> mario
>>>
>>>
>>>
>>
>>
>> Mario, have you suceeded solving this problem (the pool is just utilized
>> with 10 connections), if yes, what the solution was?
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/Geronimo-2.1.1-MDB-Performance-Question-tp18483266s134p19780147.html
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
>


Re: Geronimo 2.1.1 MDB Performance Question

2008-10-02 Thread Mario Kofler
hello,

i am afraid i never solved the problem. the problem also with me still
existed after all the different solutions that were suggested
throughout this thread.

i also never opened a jira to this problem (blame me).

i accepted that the geronimo just works with 10 message driven bean
connections at a single point in time at the moment.

sorry that i cannot give you a better solution,

regards,

mario

2008/10/2 my_forum <[EMAIL PROTECTED]>:
>
>
>
> the666pack wrote:
>>
>> hello,
>>
>> i have a question regarding MDBS in Geronimo 2.1.1
>>
>> i bombard the server with a high amount of mdb requests, the mdbs write
>> tuples to a database. so although my database connection pool maximum is
>> 20 i realize that with mdbs the pool is just utilized with 10 connections
>> to the database, no matter how many requests are coming in.
>>
>> does somebody have an idea what might be the reason for this behaviour?
>>
>> thanks a lot,
>>
>> mario
>>
>>
>>
>
>
> Mario, have you suceeded solving this problem (the pool is just utilized
> with 10 connections), if yes, what the solution was?
>
> --
> View this message in context: 
> http://www.nabble.com/Geronimo-2.1.1-MDB-Performance-Question-tp18483266s134p19780147.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>


Re: Geronimo 2.1.1 MDB Performance Question

2008-07-22 Thread Mario Kofler
hello,

is it sufficient if i post my own test app there or do i have to write
a junit test?

greetings,

mario

2008/7/22 Manu George <[EMAIL PROTECTED]>:
> Hi Mario,
>   Can you post a sample or modify the sample in the JIRA
> to replicate your issue and attach it in the mail. It will be very
> helpful to debug in that case
>
> Regards
> Manu
>
> On Sat, Jul 19, 2008 at 7:12 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>> hello,
>>
>> i hate to say it but it i still don't see more than 10 threads.
>>
>> i made the additional pool in the geronimo-application.xml just like
>> it was written in that JIRA. then my jsp takes the sender pool and the
>> mdb takes the receiver pool. both pools configured just like in the
>> posting.
>>
>> when i look at my web management console i still see just 10 threads
>> in use (out of my 250). the thread pool that is used is the
>> ConnectorThread pool.
>>
>> the DefaultThreadpool stays idle with 0 threads and no more thread
>> pools are listed.
>>
>> is there a possibility how i could monitor my queue or the 2 thread
>> pools that obviously should exist somewhere (because i got an
>> exception as i did not change the referred name in the web.xml and the
>> jsp).
>>
>> can it be that through the manual videoqueue settings in the ear the
>> server "Default\ MDB\ Container.InstanceLimit" setting is ignored?
>>
>> if yes, how can i set them in the application directly? via the
>> application-spec? i already set them both to the same value and to the
>> same value as the thread pools and this value is higher than 10.
>>
>> if you want i can post my deployment descriptors here, if it helps somehow.
>>
>> thanks a lot for helping out,
>>
>> greetings,
>>
>> mario.
>>
>>
>> 2008/7/18 Manu George <[EMAIL PROTECTED]>:
>>> Hi Mario,
>>>Looks like you have enough threads. Try making the
>>> instanceLimit also equivalent to maxSessions and
>>> maxMessagesPerSession.
>>> The explanation for these properties is given here
>>> http://activemq.apache.org/activation-spec-properties.html
>>>
>>> InstanceLimit actually is a facility to limit the no of bean instances
>>> created. Making it 0 will make the instanceLimit unlimited and so
>>> there will be no limiting from the ejb container side. The no of
>>> parallel instances will be from maxSessions
>>>
>>> The JIRA whose link I posted in one of the previous mails contains a
>>> sample plan for defining a separate thread pool/work manager for the
>>> connector
>>>
>>> Regards
>>> Manu
>>>
>>> On Fri, Jul 18, 2008 at 7:58 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>>>> hello,
>>>>
>>>> sorry for the latest issue, this was an error in my application.
>>>>
>>>> can you perhaps tell me how i can increase the thread-pool for the
>>>> activemq-resource-adapter? i just have my "default-thread-pool which
>>>> has a maximum of 250 threads but it seems that just 10 are used at
>>>> maximum when i make my MDB test.
>>>>
>>>>  i already have
>>>>
>>>> connection factory single-pool: 20
>>>> jdbc pool = 20
>>>> maxSessions = 20
>>>> ejb container pool = 32
>>>>
>>>>
>>>>  by the way can someone tell me the connection between
>>>> ejb-container-pool and max-sessions value?? i dont see the big picture
>>>> and i dont get it.
>>>>
>>>> i thought ejb container pool is the amount of simultaneous connections
>>>> that can be established. so what is max-sessions? can i set it to 32
>>>> or does it have to stay the same value as my jdbc/connection factory
>>>> values?
>>>>
>>>> thanks very much for helping,
>>>>
>>>> mario
>>>>
>>>> 2008/7/18 Manu George <[EMAIL PROTECTED]>:
>>>>> I believe there was a similar issue some time back where u needed
>>>>> maxSessions and maxMessagesPerSession to be equal. So can you try
>>>>> giving both and making them equal. The jira is
>>>>> https://issues.apache.org/jira/browse/GERONIMO-3783
>>>>>
>>>>> David Jencks had fixed this issue to the best of my knowledge and so
>>>>> this shouldn't happen but just try whether that makes any difference.
>>>

Re: Geronimo 2.1.1 MDB Performance Question

2008-07-19 Thread Mario Kofler
hello,

i hate to say it but it i still don't see more than 10 threads.

i made the additional pool in the geronimo-application.xml just like
it was written in that JIRA. then my jsp takes the sender pool and the
mdb takes the receiver pool. both pools configured just like in the
posting.

when i look at my web management console i still see just 10 threads
in use (out of my 250). the thread pool that is used is the
ConnectorThread pool.

the DefaultThreadpool stays idle with 0 threads and no more thread
pools are listed.

is there a possibility how i could monitor my queue or the 2 thread
pools that obviously should exist somewhere (because i got an
exception as i did not change the referred name in the web.xml and the
jsp).

can it be that through the manual videoqueue settings in the ear the
server "Default\ MDB\ Container.InstanceLimit" setting is ignored?

if yes, how can i set them in the application directly? via the
application-spec? i already set them both to the same value and to the
same value as the thread pools and this value is higher than 10.

if you want i can post my deployment descriptors here, if it helps somehow.

thanks a lot for helping out,

greetings,

mario.


2008/7/18 Manu George <[EMAIL PROTECTED]>:
> Hi Mario,
>Looks like you have enough threads. Try making the
> instanceLimit also equivalent to maxSessions and
> maxMessagesPerSession.
> The explanation for these properties is given here
> http://activemq.apache.org/activation-spec-properties.html
>
> InstanceLimit actually is a facility to limit the no of bean instances
> created. Making it 0 will make the instanceLimit unlimited and so
> there will be no limiting from the ejb container side. The no of
> parallel instances will be from maxSessions
>
> The JIRA whose link I posted in one of the previous mails contains a
> sample plan for defining a separate thread pool/work manager for the
> connector
>
> Regards
> Manu
>
> On Fri, Jul 18, 2008 at 7:58 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>> hello,
>>
>> sorry for the latest issue, this was an error in my application.
>>
>> can you perhaps tell me how i can increase the thread-pool for the
>> activemq-resource-adapter? i just have my "default-thread-pool which
>> has a maximum of 250 threads but it seems that just 10 are used at
>> maximum when i make my MDB test.
>>
>>  i already have
>>
>> connection factory single-pool: 20
>> jdbc pool = 20
>> maxSessions = 20
>> ejb container pool = 32
>>
>>
>>  by the way can someone tell me the connection between
>> ejb-container-pool and max-sessions value?? i dont see the big picture
>> and i dont get it.
>>
>> i thought ejb container pool is the amount of simultaneous connections
>> that can be established. so what is max-sessions? can i set it to 32
>> or does it have to stay the same value as my jdbc/connection factory
>> values?
>>
>> thanks very much for helping,
>>
>> mario
>>
>> 2008/7/18 Manu George <[EMAIL PROTECTED]>:
>>> I believe there was a similar issue some time back where u needed
>>> maxSessions and maxMessagesPerSession to be equal. So can you try
>>> giving both and making them equal. The jira is
>>> https://issues.apache.org/jira/browse/GERONIMO-3783
>>>
>>> David Jencks had fixed this issue to the best of my knowledge and so
>>> this shouldn't happen but just try whether that makes any difference.
>>>
>>> Another thing that you can try is increasing the number of threads in
>>> the thread pool for the RA.
>>>
>>> Regards
>>> Manu.
>>>
>>> On Fri, Jul 18, 2008 at 6:55 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>>>> hello,
>>>>
>>>> after all i specify it in my mdb via
>>>>
>>>> @MessageDriven(activationConfig = {
>>>>@ActivationConfigProperty(propertyName = "destinationType",
>>>>  propertyValue = "javax.jms.Queue"),
>>>>@ActivationConfigProperty(propertyName = "maxSessions",
>>>>propertyValue = "20"),
>>>>@ActivationConfigProperty(propertyName = "destination",
>>>>propertyValue = "queue/videoupdate")})
>>>>
>>>> HOWEVER after i inserted the maxSessions property no messages get
>>>> delivered anymore. also when i change back the prop by commenting it
>>>> out i dont get messages anymore through my queue. so my database is
>>>> never updated.
>&g

Re: Geronimo 2.1.1 MDB Performance Question

2008-07-18 Thread Mario Kofler
hello,

sorry for the latest issue, this was an error in my application.

can you perhaps tell me how i can increase the thread-pool for the
activemq-resource-adapter? i just have my "default-thread-pool which
has a maximum of 250 threads but it seems that just 10 are used at
maximum when i make my MDB test.

 i already have

connection factory single-pool: 20
jdbc pool = 20
maxSessions = 20
ejb container pool = 32


 by the way can someone tell me the connection between
ejb-container-pool and max-sessions value?? i dont see the big picture
and i dont get it.

i thought ejb container pool is the amount of simultaneous connections
that can be established. so what is max-sessions? can i set it to 32
or does it have to stay the same value as my jdbc/connection factory
values?

thanks very much for helping,

mario

2008/7/18 Manu George <[EMAIL PROTECTED]>:
> I believe there was a similar issue some time back where u needed
> maxSessions and maxMessagesPerSession to be equal. So can you try
> giving both and making them equal. The jira is
> https://issues.apache.org/jira/browse/GERONIMO-3783
>
> David Jencks had fixed this issue to the best of my knowledge and so
> this shouldn't happen but just try whether that makes any difference.
>
> Another thing that you can try is increasing the number of threads in
> the thread pool for the RA.
>
> Regards
> Manu.
>
> On Fri, Jul 18, 2008 at 6:55 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>> hello,
>>
>> after all i specify it in my mdb via
>>
>> @MessageDriven(activationConfig = {
>>@ActivationConfigProperty(propertyName = "destinationType",
>>  propertyValue = "javax.jms.Queue"),
>>@ActivationConfigProperty(propertyName = "maxSessions",
>>propertyValue = "20"),
>>@ActivationConfigProperty(propertyName = "destination",
>>propertyValue = "queue/videoupdate")})
>>
>> HOWEVER after i inserted the maxSessions property no messages get
>> delivered anymore. also when i change back the prop by commenting it
>> out i dont get messages anymore through my queue. so my database is
>> never updated.
>>
>> after this error i do not know anything else than reinstalling the
>> whole server. i dont even get an error. just no update in the database
>> anymore and that's it.
>>
>> maybe some ideas?
>>
>> thanks a lot,
>>
>> mario.
>>
>> 2008/7/17 Lin Sun <[EMAIL PROTECTED]>:
>>> Did you try increasing the maxSessions and maxMessagesPerSessions
>>> values in your openejb deployment plan?   The default is 10.
>>>
>>> Here is some information on this -
>>> http://activemq.apache.org/activation-spec-properties.html
>>>
>>> Lin
>>>
>>> On Thu, Jul 17, 2008 at 1:17 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>>>> 2008/7/16 David Jencks <[EMAIL PROTECTED]>:
>>>>> I think there's a setting for the mdb pool size in the activation spec.
>>>>>  Also it looks like the DefaultWorkManager only has 30 threads which is
>>>>> pretty low but I don't see offhand how this would result in only 10 worker
>>>>> threads.
>>>>
>>>> hello,
>>>>
>>>> i suppose it is right to set the MDB container instance size in the
>>>> config.xml for this?
>>>>
>>>> >>> name="org.apache.geronimo.configs/j2ee-server/2.1.1/car?ServiceModule=org.apache.geronimo.configs/j2ee-server/2.1.1/car,j2eeType=GBean,name=CustomPropertiesGBean"
>>>> gbeanInfo="org.apache.geronimo.system.properties.SystemProperties">
>>>>Default\ MDB\
>>>> Container.InstanceLimit=32
>>>>
>>>>
>>>>
>>>> but still i just get 10 concurrent worker threads to my database
>>>> very strange.
>>>>
>>>> regards,
>>>>
>>>> mario.
>>>>
>>>
>>
>


Re: Geronimo 2.1.1 MDB Performance Question

2008-07-18 Thread Mario Kofler
hello,

after all i specify it in my mdb via

@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
  propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "maxSessions",
propertyValue = "20"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "queue/videoupdate")})

HOWEVER after i inserted the maxSessions property no messages get
delivered anymore. also when i change back the prop by commenting it
out i dont get messages anymore through my queue. so my database is
never updated.

after this error i do not know anything else than reinstalling the
whole server. i dont even get an error. just no update in the database
anymore and that's it.

maybe some ideas?

thanks a lot,

mario.

2008/7/17 Lin Sun <[EMAIL PROTECTED]>:
> Did you try increasing the maxSessions and maxMessagesPerSessions
> values in your openejb deployment plan?   The default is 10.
>
> Here is some information on this -
> http://activemq.apache.org/activation-spec-properties.html
>
> Lin
>
> On Thu, Jul 17, 2008 at 1:17 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>> 2008/7/16 David Jencks <[EMAIL PROTECTED]>:
>>> I think there's a setting for the mdb pool size in the activation spec.
>>>  Also it looks like the DefaultWorkManager only has 30 threads which is
>>> pretty low but I don't see offhand how this would result in only 10 worker
>>> threads.
>>
>> hello,
>>
>> i suppose it is right to set the MDB container instance size in the
>> config.xml for this?
>>
>> > name="org.apache.geronimo.configs/j2ee-server/2.1.1/car?ServiceModule=org.apache.geronimo.configs/j2ee-server/2.1.1/car,j2eeType=GBean,name=CustomPropertiesGBean"
>> gbeanInfo="org.apache.geronimo.system.properties.SystemProperties">
>>Default\ MDB\
>> Container.InstanceLimit=32
>>
>>
>>
>> but still i just get 10 concurrent worker threads to my database
>> very strange.
>>
>> regards,
>>
>> mario.
>>
>


Re: Geronimo 2.1.1 MDB Performance Question

2008-07-17 Thread Mario Kofler
2008/7/16 David Jencks <[EMAIL PROTECTED]>:
> I think there's a setting for the mdb pool size in the activation spec.
>  Also it looks like the DefaultWorkManager only has 30 threads which is
> pretty low but I don't see offhand how this would result in only 10 worker
> threads.

hello,

i suppose it is right to set the MDB container instance size in the
config.xml for this?


Default\ MDB\
Container.InstanceLimit=32



but still i just get 10 concurrent worker threads to my database
very strange.

regards,

mario.


Re: Geronimo 2.1.1 MDB Performance Question

2008-07-16 Thread Mario Kofler
my connection factory is successfully deployed on the server and the
queue is using it as far as i can say. nevertheless, not more than 10
connections are made to the database.

does the connection factory pool size always have to be the amount of
data source connections? i already tried with 20 but still no
difference, just 10 database connections open at one time.

is there a possibility to adjust the message-queue size somehow?

thanks a lot for the answers,

greetings,

mario.


2008/7/16 Mario Kofler <[EMAIL PROTECTED]>:
> actually i deployed a geronimo-application.xml deployment plan,
> defining the connection factory:
>
>
>  jms-resources
>   xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
>org.apache.geronimo.modules
>geronimo-activemq-ra
>2.1.1
>rar
>  
>  http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
>  
>
>  org.apache.geronimo.configs
>   activemq-broker
>  2.1.1
>  car
>
>  
>
>
>  
>jms-resources
>http://geronimo.apache.org/xml/ns/naming-1.2";>
>  DefaultWorkManager
>
>  
>  
>
>  
> javax.jms.ConnectionFactory
>  
>VideoConnectionFactory
>
> javax.jms.QueueConnectionFactory
>
> javax.jms.TopicConnectionFactory
>
>  
>
>  
>  
>200
>0
>
> 5000
>5
>
>  
>
>  
>
>  
>
>
>  javax.jms.Queue
>  
> org.apache.activemq.command.ActiveMQQueue
>  
>
> queue/videoupdate
> name="PhysicalName">queue/videoupdate
>  
>
>  
>
> but maybe it ignores these settings and it takes the default settings.
> i will give it a try,
>
> thanks for helping,
>
> mario.
>
> 2008/7/16 YunFeng Ma <[EMAIL PROTECTED]>:
>> Are you using the default ActiveMQ RA (DefaultActiveMQConnectionFactory) to
>> send the JMS message? DefaultActiveMQConnectionFactory configures a
>> single-pool with default max-size 10. I'm not sure whether this can explain
>> what you saw in your scenario, but I think you can try to create a new
>> ActiveMQ RA (you can do this via admin console) with a larger size
>> single-pool and rerun your scenario.
>>
>> Hope this helps.
>>
>> -- Yun Feng
>>
>> the666pack wrote:
>>> hello,
>>>
>>> i have a question regarding MDBS in Geronimo 2.1.1
>>>
>>> i bombard the server with a high amount of mdb requests, the mdbs write
>>> tuples to a database. so although my database connection pool maximum is
>>> 20
>>> i realize that with mdbs the pool is just utilized with 10 connections to
>>> the database, no matter how many requests are coming in.
>>>
>>> does somebody have an idea what might be the reason for this behaviour?
>>>
>>> thanks a lot,
>>>
>>> mario
>>>
>>>
>>
>>
>>
>


Re: Geronimo 2.1.1 MDB Performance Question

2008-07-16 Thread Mario Kofler
actually i deployed a geronimo-application.xml deployment plan,
defining the connection factory:


  jms-resources
  http://geronimo.apache.org/xml/ns/deployment-1.2";>
org.apache.geronimo.modules
geronimo-activemq-ra
2.1.1
rar
  
  http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>
http://geronimo.apache.org/xml/ns/deployment-1.2";>
  

  org.apache.geronimo.configs
   activemq-broker
  2.1.1
  car

  


  
jms-resources
http://geronimo.apache.org/xml/ns/naming-1.2";>
  DefaultWorkManager

  
  

  
javax.jms.ConnectionFactory
  
VideoConnectionFactory

javax.jms.QueueConnectionFactory

javax.jms.TopicConnectionFactory

  

  
  
200
0

5000
5

  

  

  


  javax.jms.Queue
  
org.apache.activemq.command.ActiveMQQueue
  

queue/videoupdate
queue/videoupdate
  

  

but maybe it ignores these settings and it takes the default settings.
i will give it a try,

thanks for helping,

mario.

2008/7/16 YunFeng Ma <[EMAIL PROTECTED]>:
> Are you using the default ActiveMQ RA (DefaultActiveMQConnectionFactory) to
> send the JMS message? DefaultActiveMQConnectionFactory configures a
> single-pool with default max-size 10. I'm not sure whether this can explain
> what you saw in your scenario, but I think you can try to create a new
> ActiveMQ RA (you can do this via admin console) with a larger size
> single-pool and rerun your scenario.
>
> Hope this helps.
>
> -- Yun Feng
>
> the666pack wrote:
>> hello,
>>
>> i have a question regarding MDBS in Geronimo 2.1.1
>>
>> i bombard the server with a high amount of mdb requests, the mdbs write
>> tuples to a database. so although my database connection pool maximum is
>> 20
>> i realize that with mdbs the pool is just utilized with 10 connections to
>> the database, no matter how many requests are coming in.
>>
>> does somebody have an idea what might be the reason for this behaviour?
>>
>> thanks a lot,
>>
>> mario
>>
>>
>
>
>


Re: Stateful Session Bean Problem Geronimo 2.1.1: "Passivation Failed"

2008-07-12 Thread Mario Kofler
thanks for the answer, passivation is working fine now, with
explicitely closing the entity manager.

i got one more question, maybe you know what could be the problem..

at higher user rates i get some exception, what looks like the server
cannot take more users.

stateful bean pool is set to 800 and strict pooling to false.

maybe you already saw this exception or know at first sight what might
be the reason.

if not, nevermind. i am fine that passivation works now.

thanks and greetings, mario.


stack trace with exception:

 [exec] javax.ejb.EJBTransactionRolledbackException: Transaction
was rolled back, presumably because setRollbackOnly was called during
a synchronization: Unable to commit: transaction marked for rollback
 [exec] at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:348)
 [exec] at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:251)
 [exec] at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 [exec] at $Proxy47.writeToDB(Unknown Source)
 [exec] at vt.servlet.AddServlet.doGet(AddServlet.java:48)
 [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
 [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
 [exec] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 [exec] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 [exec] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 [exec] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 [exec] at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
 [exec] at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
 [exec] at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
 [exec] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 [exec] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 [exec] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 [exec] at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
 [exec] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
 [exec] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 [exec] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
 [exec] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 [exec] at java.lang.Thread.run(Thread.java:619)
 [exec] Caused by:
javax.transaction.TransactionRolledbackException: Transaction was
rolled back, presumably because setRollbackOnly was called during a
synchronization: Unable to commit: transaction marked for rollback
 [exec] at
org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:146)
 [exec] at
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:76)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainerManagedTxPolicy.afterInvoke(StatefulContainerManagedTxPolicy.java:57)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainer._invoke(StatefulContainer.java:467)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainer.businessMethod(StatefulContainer.java:413)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainer.invoke(StatefulContainer.java:271)
 [exec] at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 [exec] at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 [exec] at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:245)
 [exec] ... 21 more


2008/7/11 David Blevins <[EMAIL PROTECTED]>:
>
> On Jul 10, 2008, at 10:36 PM, Mario Kofler wrote:
>
>> thanks,
>>
>>
>>> if the
>>> persistence provider doesn't want it serialized, there's nothing we can
>>> do
>>> about it.
>>
>> so that means that it is not a bug but the persistence provider
>> hinders a passivation?
>
> Not a container bug but a bean bug.  The container will try to passivate
> you, you just need to make sure it can, which in this case means not holding
> onto a reference to your bean-managed EntityManager.  The easiest way is to
> destroy your EntityManager object in PrePassivate (close it and null the
> ref) and create yourself a new one in PostActivate.
>
> -David
>
>
>


Re: Stateful Session Bean Problem Geronimo 2.1.1: "Passivation Failed"

2008-07-10 Thread Mario Kofler
thanks,


> if the
> persistence provider doesn't want it serialized, there's nothing we can do
> about it.

so that means that it is not a bug but the persistence provider
hinders a passivation?  or does it mean that stateful session beans
can just be passivated without involved entity manager object?

greetings,

mario

>
>
>
> -David
>
>
>


Re: Stateful Session Bean Problem Geronimo 2.1.1: "Passivation Failed"

2008-07-10 Thread Mario Kofler
hello,

first, thanks a lot for helping out. of course the problem can lie in
my application too, but as i reduced it to the most important parts, i
cannot see where.

>Are you using a Container-Managed EntityManager (i.e. looked up or injected) 
>or a Bean-Managed EntityManager (created yourself via an EntityManagerFactory) 
>?

can you maybe in two sentences tell me what is the big difference to
use either of that two? i go via an entity manager factory, here is
the relevant part of the code:

@Stateful
public class WriteDataBean implements Serializable,WriteData
{

@PersistenceUnit(unitName="valhalla")
private EntityManagerFactory emf;
private EntityManager em;

//create new PersistentContext
em = emf.createEntityManager();

}

and i experienced no problems with stateless beans. also stateful
beans work fine for a certain time and load.. just as soon as it comes
to passivation, the beans i have the stated problem.

thanks for helping,

greetings,

mario


2008/7/9 David Blevins <[EMAIL PROTECTED]>:
>
> On Jul 9, 2008, at 3:43 AM, the666pack wrote:
>
>>
>> hello,
>>
>> my old question about stateless session beans was posted here
>>
>>
>> http://www.nabble.com/Re%3A-Geronimo-2.0.2---OpenEJB-%22Passivation-Failed%22-td16144020s134.html#a16024338
>>
>> it was concerned about the "passivation bug" in the geronimo 2.0.2
>> version.
>> so i now installed the 2.1.1 version in order to test the stateful session
>> bean performance of geronimo.
>>
>> unfortunately i still get the problem: "passivation failed" (see stack
>> trace
>> below)...
>>
>> Was this passivation issue ever solved? or is it still not working
>> properly?
>> i just can turn passivation off, what leads to an inferior performance.
>
> The original issue you had was "java.io.NotSerializableException:
> vt.bean.stateful.WriteDataBean" and was fixed with
> http://issues.apache.org/jira/browse/OPENEJB-215 which is in 2.1.1.
>
> The serialization of the EntityManager may or may not be a bug.  Are you
> using a Container-Managed EntityManager (i.e. looked up or injected) or a
> Bean-Managed EntityManager (created yourself via an EntityManagerFactory) ?
>
> -David
>
>> stack trace:
>>
>>[exec] 12:38:15,811 INFO  [OpenEJB] Passivating to file
>>
>> /usr/local/geronimo/5.2.1.1/var/temp/11d1def534ea1be0=-49fa44bf=11b07642b72=-7fe7
>>[exec] 12:38:15,816 ERROR [OpenEJB] Passivation failed
>>[exec] java.io.NotSerializableException:
>> org.apache.openjpa.persistence.EntityManagerImpl
>>[exec] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
>>[exec] at
>>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
>>[exec] at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
>>[exec] at
>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
>>[exec] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>>[exec] at
>>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
>>[exec] at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
>>[exec] at
>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
>>[exec] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>>[exec] at
>>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
>>[exec] at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
>>[exec] at
>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
>>[exec] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>>[exec] at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
>>[exec] at
>>
>> org.apache.openejb.core.stateful.SimplePassivater.passivate(SimplePassivater.java:73)
>>[exec] at
>>
>> org.apache.openejb.core.stateful.SimplePassivater.passivate(SimplePassivater.java:92)
>>[exec] at
>>
>> org.apache.openejb.core.stateful.StatefulInstanceManager.passivate(StatefulInstanceManager.java:496)
>>[exec] at
>>
>> org.apache.openejb.core.stateful.StatefulInstanceManager$BeanEntryQueue.add(StatefulInstanceManager.java:610)
>>[exec] at
>>
>> org.apache.openejb.core.stateful.StatefulInstanceManager.poolInstance(StatefulInstanceManager.java:429)
>>[exec] at
>>
>> org.apache.openejb.core.stateful.StatefulContainer.createEJBObject(StatefulContainer.java:314)
>>[exec] at
>>
>> org.apache.openejb.core.stateful.StatefulContainer.invoke(StatefulContainer.java:267)
>>[exec] at
>>
>> org.apache.openejb.core.ivm.EjbHomeProxyHandler.create(EjbHomeProxyHandler.java:267)
>>[exec] at
>>
>> org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:158)
>>[exec] at
>>
>> org.apache.openej

Re: error writing tuple to database "the owning entity is not mapped" geronimo 2.1.1

2008-07-07 Thread Mario Kofler
hi jacek,

thanks for your help, i did change my birthdate field to sql.Date now.
the error message remains. but i realized, that the error message just
appears at the first write operation: all following write operations
are executed successfully. i will try to make my tests, i think i'll
just ignore the first write action and start my tests from the 2nd
write operation on.

for the moment, thanks!

mario.

2008/7/6 Jacek Laskowski <[EMAIL PROTECTED]>:
> On Sun, Jul 6, 2008 at 11:34 AM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>>
>
> Hi Mario,
>
> Let's make it simpler by removing some unneeded, defaulted
> configuration values in your sample.
>
>> http://java.sun.com/xml/ns/persistence";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> 
>> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
>> version="1.0">
>>  
>
> Hint: you may remove transaction-type as it's JTA in managed
> environment like Geronimo.
>
>>videothek
>>
>> org.apache.openjpa.persistence.PersistenceProviderImpl
>
> Provider defaults to openjpa in Geronimo. You may remove it.
>
>>vt.bean.entity.Person
>>vt.bean.entity.Actor
>>vt.bean.entity.Director
>>vt.bean.entity.Movie
>>vt.bean.entity.Dvd
>
> Not needed in managed environment like Geronimo. It makes things run
> faster - no need to look for annotated classes, but am not sure if we
> don't do this even though the class elements are specified.
>
> Also, you showed Person entity class, but what about the rest? Either
> remove them and let's play with a single entity only and add more
> later or show all of them as I think the issue might be in the others.
>
>>
>>
>>  
>>  
>>
>>jdbc/postgres
>>jdbc/postgres
>
> I think *data-source should be before properties element. Geronimo
> should really be more strict.
>
>> @Entity
>> @Table(name="person")
>> @Inheritance(strategy=InheritanceType.JOINED)
>> @DiscriminatorColumn(name="role", discriminatorType=DiscriminatorType.STRING)
>
> discriminatorType is defaulted to STRING.
>
>> @DiscriminatorValue("P")
>> public class Person implements java.io.Serializable
>> {
>>private int id;
>>private String name;
>>private Calendar birthdate;
>>private String origin;
>>
>>@Id
>>@GeneratedValue
>>public int getId()
>>{
>>return id;
>>}
>>
>>public void setId(int id)
>>{
>>this.id = id;
>>}
>>
>>public String getName()
>>{
>>return name;
>>}
>>
>>public void setName(String name)
>>{
>>this.name = name;
>>}
>>
>>@Temporal(TemporalType.DATE)
>>public Calendar getBirthdate()
>>{
>>return birthdate;
>>}
>
> I think that's the issue - @Temporal. According to the spec - JSR 220:
> Enterprise JavaBeansTM,Version 3.0 Java Persistence API - page 234:
>
> 
> 
> 
> public enum TemporalType {
> DATE, // java.sql.Date
> TIME, // java.sql.Time
> TIMESTAMP // java.sql.Timestamp
> }
> 
> 
> 
> 
> 
> 
> 
> 
>
> so Calendar seems to not be accepted for @Temporal annotation. Change
> the return type of the getter.
>
> I think the Person entity is not mapped correctly and when you run
> your sample you are off the error messages which tell you the Person
> entity could not be mapped.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>


Re: error writing tuple to database "the owning entity is not mapped" geronimo 2.1.1

2008-07-06 Thread Mario Kofler
>
> If a person becomes a director, (s)he won't be able to
> resign and become a manager or just a developer?

that's right. for my application it is assumed that if a person is a
director this person is just a director and cannot be an actor in the
same time.

>
> On to your issue...
>
> > so i want to write a Person first, to keep it simple. unfortunately i get an
> > error when i try to perform a write:
>
> Could you show us how Person looks like? And your persistence.xml too.
> I assume you don't use orm.xml or alike, do you? If so, show it too.

so thanks, the persistence.xml we discussed a lot already if i
remember right ;):

http://java.sun.com/xml/ns/persistence";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
 version="1.0">
  
videothek
org.apache.openjpa.persistence.PersistenceProviderImpl
vt.bean.entity.Person
vt.bean.entity.Actor
vt.bean.entity.Director
vt.bean.entity.Movie
vt.bean.entity.Dvd



  
 

jdbc/postgres
jdbc/postgres
  




 the Person entity:


/*Persistent Entity Person*/
@Entity
@Table(name="person")
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="role", discriminatorType=DiscriminatorType.STRING)
@DiscriminatorValue("P")
public class Person implements java.io.Serializable
{
private int id;
private String name;
private Calendar birthdate;
private String origin;

@Id
@GeneratedValue
public int getId()
{
return id;
}

public void setId(int id)
{
this.id = id;
}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}

@Temporal(TemporalType.DATE)
public Calendar getBirthdate()
{
return birthdate;
}

public void setBirthdate(Calendar birthdate)
{
this.birthdate = birthdate;
}

public String getOrigin()
{
return origin;
}

public void setOrigin(String origin)
{
this.origin = origin;
}

}


and yes i do not use an orm.xml

thanks a lot for helping,

greetings,

mario.

>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: MDB performance tuning, configuration

2008-03-24 Thread Mario Kofler
hallo,

it seems i completely messed up with my MDB application now. i tried the
"activation spec" that you mentioned and it worked fine. then i thought ia
lso try to set the InstanceLimit to 0. so i went to the config.xml file and
changed the "MDB\ Container\ InstanceLimit=0" wrong thing to do. after that
i did not receive the wanted updates anymore in the database. i increased
the value again to "maxPool" size.. and since that at startup of the server
or at deploy time i always realize that some messages are delivered but then
it stops again. i dont even send messages anymore, the messages that are
delivered are from a test 2 hours ago!

i also tried to restart the database, restart the server, computer,
everything. and tried to start with an empty db. the only thing i realize is
that at startup or deploytime of my application it sends some 10 messages to
the queue and after this it stops.

by the way.. i already set the values back to their initial state.. but no
effect.. i keep having this error and not possible to deliver any new
messages.. just everytime i start i see more 10 values being changed in the
database.

can anyone help me, please.

thanks,

mario

2008/3/23, Manu George <[EMAIL PROTECTED]>:
>
> You may have tried this out but increasing the maxMessagesPerSession
> activation config property will increase the prefetch size and
> generally speed it up a bit more. I assume u have already increased
> the maxSessions activation config property to increase the no of
> parallel Mdb instances. Here is a link for the properties that AMQ
> allows http://activemq.apache.org/activation-spec-properties.html. The
> configurable OpenEJB properties are given here
> http://openejb.apache.org/example-generated-documentation.html.
>
> Try setting the InstanceLimit property of the MdbContainer to 0 so
> that the no of instances created matches the no of AMQ sessions
> available. For setting this you need to set this as a system property.
> The property should be containerId.InstanceLimit where containerId is
> of the format  .-
>
> eg: org.apache.geronimo.configs/activemq-ra/2.2-SNAPSHOT/car.ActiveMQ
> RA-javax.jms.MessageListener
>
> ie  =  artifactId of the jms RA
>  - The resource Group name u gave while creating the
> RA
>  - javax.jms.MessageListener in this case
>
> So the property in this case can be set as
> org.apache.geronimo.configs/activemq-ra/2.2-SNAPSHOT/car.ActiveMQ\
> RA-javax.jms.MessageListener.InstanceLimit=0
>
> Regards
>
> Manu
>
> On Sun, Mar 23, 2008 at 4:49 PM, the666pack <[EMAIL PROTECTED]>
> wrote:
> >
> >  hello,
> >
> >  i am trying to test the performance of geronimo under load for message
> >  driven beans. the observed behaviour is that i get a maximum of about
> 85
> >  transactions per second. after this, tested with about 60 concurrent
> users,
> >  the performance drops again to about 45 tps. i hoped to increase the
> >  performance somehow.. things i already tried:
> >
> >  -increase the mdb pool size
> >  -increase the thread pool size
> >  -increase the connector-thread-pool-size
> >
> >  unfortunately nothing helped, the performance situation remains the
> same.
> >
> >  another observed behaviour is that in the time of silence between tests
> the
> >  server needs some time to fulfill the requests sent before. so i see it
> is
> >  still working although i am not sending mdb-requests anymore.
> >
> >  i suppose these are the requests that are still in the queue and have
> to be
> >  finished. i think this is the reason for the performance drop with more
> >  concurrent users. i would like to see it perform without this
> >  "aftertime-working" and handle the requests "in time".
> >
> >  maybe someone can give me a hint which other values could be important
> to
> >  change for the performance of mdbs getting real good. i thank you very
> much
> >  for your help,
> >
> >  greetings,
> >
> >  mario
> >  --
> >  View this message in context:
> http://www.nabble.com/MDB-performance-tuning%2C-configuration-tp16234678s134p16234678.html
> >  Sent from the Apache Geronimo - Users mailing list archive at
> Nabble.com.
> >
> >
>


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-03-10 Thread Mario Kofler
2008/3/10, Mario Kofler <[EMAIL PROTECTED]>:
>
>
>
> 2008/3/10, David Blevins [EMAIL PROTECTED]:
> >
> >
> >
> > You could implement serializable on your Entity beans, but it's ill
> > advised in almost any situation to have the data passivated with your
> > bean as you wind up with a private, detached, copy of the data that
> > may be outdated.  The rare case may be that you're collecting data
> > that has yet to be persisted (never been attached) and therefore
> > doesn't live in the EntityManager's cache or database yet, but even
> > then you should really be using a transaction which would prevent your
> > bean from getting passivated at all so the issue should never arise.
> >
> > -David
>
>
> so this means i have to manually "turn off" the passivation of my SFSB via
> bean managed transactions. but i suppose this means a performance loss :(.
> is this problem another issue of the bug mentioned above and so the only
> solution is turning off the passivation mechanism?
>
> further, til now whenever i tried to make some kind of manual transaction
> in my beans i always got the error that the container is taking care of the
> transactions and bean managed control (transactions) is not allowed. maybe
> you can tell me what i have to change to be able to add transactions to
> my bean.
>
> thanks, mario
>
>
>
>
and even further, is there the possibility to turn off the passivation for
SFSB at all in geronimo? like some entry in a deployment descriptor
"passivation=false" ?

thanks for helping,

mario.


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-03-10 Thread Mario Kofler
2008/3/10, David Blevins [EMAIL PROTECTED]:
>
>
>
> You could implement serializable on your Entity beans, but it's ill
> advised in almost any situation to have the data passivated with your
> bean as you wind up with a private, detached, copy of the data that
> may be outdated.  The rare case may be that you're collecting data
> that has yet to be persisted (never been attached) and therefore
> doesn't live in the EntityManager's cache or database yet, but even
> then you should really be using a transaction which would prevent your
> bean from getting passivated at all so the issue should never arise.
>
> -David


so this means i have to manually "turn off" the passivation of my SFSB via
bean managed transactions. but i suppose this means a performance loss :(.
is this problem another issue of the bug mentioned above and so the only
solution is turning off the passivation mechanism?

further, til now whenever i tried to make some kind of manual transaction in
my beans i always got the error that the container is taking care of the
transactions and bean managed control (transactions) is not allowed. maybe
you can tell me what i have to change to be able to add transactions to
my bean.

thanks, mario


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-03-09 Thread Mario Kofler
thanks!

unfortunately i cannot wait til it is coming in a release. the problem i
have got now is that my SFSB implements Serializable but i still keep
getting the error!!! very unfortunate.

i realized that the error is not coming after accessing the SFSB but just
after accessing the method that writes the beans to the database.

Do also the Entity beans have to implement Serializable? or do i have to do
something for the entity manager which is created in this function?

thanks for the help,

mario.

2008/3/6, David Blevins <[EMAIL PROTECTED]>:
>
>
> On Feb 24, 2008, at 1:27 PM, David Blevins wrote:
>
> >
> > On Feb 24, 2008, at 4:24 AM, the666pack wrote:
> >
> >>[exec] 13:04:31,865 INFO  [OpenEJB] Passivation failed
> >>[exec] java.io.NotSerializableException:
> >> vt.bean.stateful.WriteDataBean
> >>[exec] at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
> >
> > This is an unimplemented feature:
> http://issues.apache.org/jira/browse/OPENEJB-215
> >
> > The workaround is to add java.io.Serializable to your stateful bean
> > class.
>
>
> FYI, this feature is now implemented and should show up in a release
> Real Soon Now.
>
>
> -David
>
>


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-02-25 Thread Mario Kofler
2008/2/25, Jacek Laskowski <[EMAIL PROTECTED]>:
>
> On Mon, Feb 25, 2008 at 12:20 PM, Mario Kofler <[EMAIL PROTECTED]>
> wrote:
>
> > so there is a simple reason why i  decided to close the entity manager
> > explicitely: because i thought it is a good idea ;)
>
>
> And you didn't get any exception?! It's disallowed to play with server
> managed resources and close them just like you tried to do. The reason
> people are still using EJB3 and all the Java EE 5 stack is their
> simplicity (or attempt to be simple) as far as resources are
> concerned. You just use them and don't have to worry about managing
> them - that's the role of Geronimo or other less-feature-rich
> application servers ;-) Use it and when you're done forget about them.
> Geronimo takes care of them for you.
>
> > em.flush();
>
> Don't do that. Forget about managing resources by yourself and let
> Geronimo do that for you. Besides, it's also not recommended unless
> you're using RESOURCE_LOCAL PU which is not recommended in the managed
> environment like Geronimo either.


i think there was some reason why i called em.flush() but i commented it out
now and it seems to work fine too. if i run into some problem i will tell ;)

Show us the persistence.xml. Let's make it better/simpler/shorter
> (cross out or add any word you'd like to hear about your app ;-)). The
> less you write it's better for your app. That's why Geronimo (or other
> Java EE 5 app servers) are for.



ok thanks here is my persistence.xml:

http://java.sun.com/xml/ns/persistence";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
 version="1.0">
  
videothek
org.apache.openjpa.persistence.PersistenceProviderImpl

vt.bean.entity.Person
vt.bean.entity.Actor
vt.bean.entity.Director
vt.bean.entity.Movie
vt.bean.entity.Dvd



  


jdbc/postgres
jdbc/postgres
  


it took me some configuration time to get it working this way and i think it
is already as short as it can get ;)

so another thing is when i keep calling the bean repeatedly to insert 1
director per transaction as in a performance test after about 100 inserts it
is the first time i get an exception. the server continues inserting to the
db but the exception is coming every now and then.. i wonder what it means..
i don't want to just throw exceptions here, but maybe you see it with one
eye, taking a short look.. thanks in anyway, here is the stacktrace:

 [exec] EM created!
 [exec] Write of 1 Directors successful!
 [exec] EM created!
 [exec] Write of 1 Directors successful!
 [exec] EM created!
 [exec] Write of 1 Directors successful!
 [exec] javax.naming.NamingException: Could not look up :
ejb/WriteDataBean [Root exception is
java.lang.reflect.UndeclaredThrowableException]
 [exec] at org.apache.xbean.naming.context.ContextUtil.resolve(
ContextUtil.java:65)
 [exec] at org.apache.xbean.naming.context.AbstractContext.lookup(
AbstractContext.java:118)
 [exec] at org.apache.xbean.naming.context.AbstractContext.lookup(
AbstractContext.java:617)
 [exec] at org.apache.xbean.naming.context.AbstractContext.lookup(
AbstractContext.java:158)
 [exec] at org.apache.xbean.naming.context.AbstractContext.lookup(
AbstractContext.java:617)
 [exec] at org.apache.xbean.naming.context.AbstractContext.lookup(
AbstractContext.java:158)
 [exec] at org.apache.xbean.naming.context.AbstractContext.lookup(
AbstractContext.java:603)
 [exec] at javax.naming.InitialContext.lookup(InitialContext.java
:392)
 [exec] at vt.servlet.AddServlet.doGet(AddServlet.java:46)
 [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java
:693)
 [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java
:806)
 [exec] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:290)
 [exec] at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
 [exec] at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:230)
 [exec] at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:175)
 [exec] at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(
DefaultSubjectValve.java:56)
 [exec] at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(
GeronimoStandardContext.java:353)
 [exec] at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(
GeronimoBeforeAfterValve.java:47)
 [exec] at org.apache.catalina.core.StandardHostValve.in

Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-02-25 Thread Mario Kofler
2008/2/25, Jacek Laskowski <[EMAIL PROTECTED]>:
>
> On Sun, Feb 24, 2008 at 12:31 PM, the666pack <[EMAIL PROTECTED]>
> wrote:
>
> >  the only thing i do in the @PreDestroy method is to explicitly close
> the
> >  entity manager via em.close() and then print a line to stdout that the
> >  entitymanager was closed. am i not supposed to close the em?
>
>
> Dave explained why it blew up. What worried me a lot was when you
> wrote that you closed em explicitly? Why are you doing it? Show the
> code so it's simpler to talk about it.



hello.

so there is a simple reason why i  decided to close the entity manager
explicitely: because i thought it is a good idea ;)

so in my "WriteDataBean" class i have more different methods which are all
writing data to the database. One time it is Directors, one time Movies..
and so on. one of these methods, the "writeDirectors" is in the following
code listing:

 private String writeDirectors()
{

try
{
for(int i=0;i

Re: Comparison Open Source Application Servers

2008-01-31 Thread Mario Kofler
i am at the moment doing a thesis on this topic but i think it will take
some time still.

greetings,

mario.

2008/1/31, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>  Hi,
>
> We need to compare the open source Application Servers - JBoss, Apache
> Geronimo and Glassfish based on features as well as on performance.
>
> If anyone has done such a comparison, please share your knowledge with us.
>
> Thanks,
> Yogesh
>
> *P** Please do not print this email unless it is absolutely necessary.
> Spread environmental awareness.*
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>


Geronimo 2.0/openejb/postgresql

2008-01-09 Thread Mario Kofler

hello,

i searched the web for the solution but i did not find :(

my setup:

i want to get my application running on Geronimo 2.0 with openejb as 
entity manager and postgresql as underlying database.


things i already did:

i did create a new database pool called "DefaultDS" through the 
admin-console


then for my application i modified the persistence.xml file according to 
mails i found in the web:


http://java.sun.com/xml/ns/persistence";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"; 


version="1.0">
 
   videothek
   
org.apache.openjpa.persistence.PersistenceProviderImpl

   
videothek.jar
   
   
   
 
 value="org.postgresql.Driver" />

 
 
 value="jdbc:postgresql://localhost:5432/video" />

 
   
 


my geronimo-web.xml file:


http://geronimo.apache.org/xml/ns/j2ee/web-1.1";
  xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1";
  xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1";
  xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1";>
   
   
   videothek
   war
   

   
 
   console.dbpool
   DefaultDS
 
   
   
  
   /valhalla


   

   
   jdbc/valhalla
   DefaultDS
   


then it is possible to deploy the application to the geronimo server.

the problem is as soon as i want to create an entity manager in my 
application:


/*code snippet*/
 @PersistenceUnit(unitName="valhalla")
   private EntityManagerFactory emf;
   private EntityManager em;  
   em = emf.createEntityManager();

/*code snippet*/

i get the following error:

   [exec] Caused by: java.lang.Exception: java.lang.RuntimeException: 
There were errors initializing your configuration: 
<1.0.0-r561970-r561970 fatal store error> 
org.apache.openjpa.util.StoreException: org.postgresql.Driver in 
classloader org.apache.geronimo.configs/openjpa/2.0.1/car


root cause:

javax.ejb.NoSuchEJBException: reference is invalid

org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:208)

org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
$Proxy68.getNewData(Unknown Source)
org.apache.jsp.addTool_jsp._jspService(addTool_jsp.java:165)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)


please help me, i am stuck for days now with this problem and i dont 
find nothing new anymore on the net. i tried mayn different kinds of 
deployment descriptors. this error is the farthest i get.


thank you very much for your help,

greetings,

mario