Re: Configuring HikariCP with OpenEjb . ( need inputs)

2019-12-20 Thread Kalyan
Thank you Jon!

Regards
Kalyan



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html


Re: Configuring HikariCP with OpenEjb . ( need inputs)

2019-12-20 Thread Kalyan
@Jon or @Richard !!
Could you please advice. 

thanks
Kalyan



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html


Re: Configuring Quartz under TomEE

2019-12-20 Thread Richard Monson-Haefel
You probably tried this but I was going to suggest a Custom Resource.
http://tomee.apache.org/application-resources.html

On Thu, Dec 19, 2019 at 10:13 PM Ihsan Ecemis  wrote:

>
> Hello Everyone,
>
> We would like to store Quartz scheduling information within a relational
> database. We tried different configuration options to use our own
> properties file instead of TomEE's default, but could not get it to work.
>
> Here are the things we tried:
>
> (1) We defined the system property 'org.quartz.properties', e.g. did
> "-Dorg.quartz.properties=/tmp/quartz.properties".
> (2) Since TomEE shades org.quartz, we also tried
> "-Dorg.apache.openejb.quartz.properties=/tmp/quartz.properties".
> (3) We also tried configuring this via web.xml file by adding:
>
>   
> quartz:config-file
> /tmp/quartz.properties
>   
>
>
> In all these cases, even though we set org.quartz.jobStore.class =
> org.quartz.impl.jdbcjobstore.JobStoreTX (or
> org.apache.openejb.quartz.jobStore.class =
> org.apache.openejb.quartz.impl.jdbcjobstore.JobStoreTX) and adjust all
> parameters as documented at Quartz User Guide,  TomEE is initializing
> RAMJobStore instead of JobStoreTX.  Also, there is no indication in the
> logs that Quartz is opening our properties file.
>
> How can we configure Quartz under TomEE?
>
> Any help would be greatly appreaciated.
>
> Thanks,
>
> Ihsan.



-- 
Richard Monson-Haefel
https://twitter.com/rmonson
https://www.linkedin.com/in/monsonhaefel/


Re: Old Gen Full of Annotation Finder Index

2019-12-20 Thread Jonathan Gallimore
Hi Paul

Thanks for your feedback, that's great news. FYI, TomEE 8.0.1 is up for
vote (feel free to vote on it!), and this change is included.

Cheers

Jon

On Fri, Dec 20, 2019 at 7:10 AM Paul Carter-Brown
 wrote:

> Hi Jon
>
> Latest snapshot worked a charm. Old gen went from 500MB to 110MB after
> deploy completed. Thanks so much
>
> On Tue, 17 Dec 2019, 11:33 Paul Carter-Brown, 
> wrote:
>
>> Thanks Jon.
>>
>> I'm away at the moment but will give it a spin in the next few days and
>> let you know. Thanks again
>>
>> On Mon, 16 Dec 2019, 22:53 Jonathan Gallimore, <
>> jonathan.gallim...@gmail.com> wrote:
>>
>>> Hi Paul
>>>
>>> I've pushed a new snapshot which (hopefully) should address this. The CI
>>> build is running on it now. Would you mind giving it a try? If it looks
>>> good, I'll finish rolling the release. Fingers crossed it looks ok for you.
>>>
>>> Jon
>>>
>>> On Mon, Dec 16, 2019 at 2:48 PM Jonathan Gallimore <
>>> jonathan.gallim...@gmail.com> wrote:
>>>
 Further update - I think my changes work with respect to this issue,
 but I do have a bunch of unit test failures which I need to look into. For
 info, here's the diff:

 diff --git
 a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
 b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
 index a6e2bdc4f5..c0d1a8c98f 100644
 ---
 a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
 +++
 b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
 @@ -69,10 +69,7 @@ import org.apache.openejb.cdi.ThreadSingletonService;
  import org.apache.openejb.classloader.ClassLoaderConfigurer;
  import org.apache.openejb.classloader.CompositeClassLoaderConfigurer;
  import org.apache.openejb.component.ClassLoaderEnricher;
 -import org.apache.openejb.config.ConfigurationFactory;
 -import org.apache.openejb.config.NewLoaderLogic;
 -import org.apache.openejb.config.QuickJarsTxtParser;
 -import org.apache.openejb.config.TldScanner;
 +import org.apache.openejb.config.*;
  import org.apache.openejb.core.ConnectorReference;
  import org.apache.openejb.core.CoreContainerSystem;
  import org.apache.openejb.core.CoreUserTransaction;
 @@ -829,6 +826,14 @@ public class Assembler extends AssemblerTool
 implements org.apache.openejb.spi.A

  final AppContext appContext = new
 AppContext(appInfo.appId, SystemInstance.get(), classLoader,
 globalJndiContext, appJndiContext, appInfo.standaloneModule);
  appContext.getProperties().putAll(appInfo.properties);
 +
 +final Set keys =
 appContext.getProperties().keySet();
 +for (final Object key : keys) {
 +if (! Module.class.isInstance(key)) {
 +appContext.getProperties().remove(key);
 +}
 +}
 +
  appContext.getInjections().addAll(injections);
  appContext.getBindings().putAll(globalBindings);
  appContext.getBindings().putAll(appBindings);
 diff --git
 a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
 b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
 index feff954d40..aed0fda941 100644
 ---
 a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
 +++
 b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
 @@ -384,12 +384,7 @@ public class JndiEncBuilder {
  reference = new LinkRef(jndiName);

  } else if (BeanManager.class.equals(type)) {
 -reference = new LazyObjectReference(new
 Callable() {
 -@Override
 -public BeanManager call() throws Exception {
 -return new
 InjectableBeanManager(WebBeansContext.currentInstance().getBeanManagerImpl());
 -}
 -});
 +reference = new LazyObjectReference<>(new
 BeanManagerLazyReference());

  } else if (UserTransaction.class.equals(type)) {
  reference = new
 IntraVmJndiReference("comp/UserTransaction");
 @@ -684,4 +679,11 @@ public class JndiEncBuilder {
  }
  }
  }
 +
 +public static class BeanManagerLazyReference implements
 Callable {
 +@Override
 +public BeanManager call() throws Exception {
 +return new
 InjectableBeanManager(WebBeansContext.currentInstance().getBeanManagerImpl());
 +}
 +}
  }
 

Re: Configuring Quartz under TomEE

2019-12-20 Thread Jonathan Gallimore
TomEE uses Quartz internally to schedule EJB timers etc - the reason for
shading it is to avoid it conflicting with Quartz packaged in your
application. So theoretically, you should be able to package Quartz in your
application, and use it per its own documentation. If you have a code
sample with your issue that you can provide us with, we'd be happy to take
a look.

Cheers

Jon

On Fri, Dec 20, 2019 at 4:13 AM Ihsan Ecemis  wrote:

>
> Hello Everyone,
>
> We would like to store Quartz scheduling information within a relational
> database. We tried different configuration options to use our own
> properties file instead of TomEE's default, but could not get it to work.
>
> Here are the things we tried:
>
> (1) We defined the system property 'org.quartz.properties', e.g. did
> "-Dorg.quartz.properties=/tmp/quartz.properties".
> (2) Since TomEE shades org.quartz, we also tried
> "-Dorg.apache.openejb.quartz.properties=/tmp/quartz.properties".
> (3) We also tried configuring this via web.xml file by adding:
>
>   
> quartz:config-file
> /tmp/quartz.properties
>   
>
>
> In all these cases, even though we set org.quartz.jobStore.class =
> org.quartz.impl.jdbcjobstore.JobStoreTX (or
> org.apache.openejb.quartz.jobStore.class =
> org.apache.openejb.quartz.impl.jdbcjobstore.JobStoreTX) and adjust all
> parameters as documented at Quartz User Guide,  TomEE is initializing
> RAMJobStore instead of JobStoreTX.  Also, there is no indication in the
> logs that Quartz is opening our properties file.
>
> How can we configure Quartz under TomEE?
>
> Any help would be greatly appreaciated.
>
> Thanks,
>
> Ihsan.