Re: Run TomEE as a daemon

2012-07-25 Thread David Blevins

On Jul 24, 2012, at 7:17 AM, Christopher Schultz wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> David,
> 
> On 7/23/12 8:29 PM, David Blevins wrote:
>> The page can be edited by anyone by clicking the blue pencil icon
>> in the upper right, so contributions are highly encouraged.  All
>> changes are reviewed before going live, so don't worry about
>> messing anything up.
> 
> I made an edit to include a link to the commons-daemon documentation
> but figured that "publish site" was an action probably best done by
> someone on the TomEE team ;)

Thanks, Chris!

The online editing for the CMS is still a bit unfriendly.  Hoping to put my 
Infra hat on and hack on it again at some point.

Anyway, the 'submit' button really just saves and your edit is still in your 
private sandbox.  Click the edit link on the page again then tack on 
"?action=mail" and then it will send off the patch.  The url would look 
something like:

https://cms.apache.org/openejb/wc/diff/dblevins-_Le_Oo/trunk/content/unix-daemon.mdtext?action=mail

The link is only available once you've saved an edit and are presented with the 
'successful edit' page, at which point you have to know to click 'Diff' then on 
the next page click 'Mail Diff'.

It's a work in progress :)


-David


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Run TomEE as a daemon

2012-07-23 Thread David Blevins

On Jul 23, 2012, at 2:24 PM, Konstantin Kolinko wrote:

> 2012/7/24 Christopher Schultz :
>> 
>> On 7/23/12 2:44 PM, Konstantin Kolinko wrote:
>>> See proper Apache Commons-Daemon jsvc documentation, at
>>> http://commons.apache.org/daemon/jsvc.html
>> 
>> If the TomEE documentation is incorrect, we should help them correct
>> it. Was this just a knee-jerk reaction to the OP's use of something
>> other than the super-official commons-daemon jsvc documentation, or is
>> there a problem with the TomEE stuff?
> 
> It is not "super-official". It is the official one and naturally the
> primary source of information regarding jsvc. The others are partial
> reflections of the original.
> 
> The problems with TomEE documentation:
> 
> 1) It should properly reference the project, it is *Apache* Commons Daemon.
> 
> 2) The "./configure --with-java" phrase in TomEE doc is misplaced.
> 
> It is part of the "Building jsvc" step only (to find the C API header
> files in JDK). It should not be in the introductory section - that is
> why OP was fooled. It has nothing to do with running jsvc.
> 
> 
> Note, that jsvc doc mentions the following useful options:
> a) the "-home" argument to jsvc can be used to specify location of the
> home directory of JDK/JRE.
> 
> b) the option to enable debug-level logging to get more information
> for troubleshooting. IIRC, the debug logging should show what paths
> are tried looking for java executable.

Thanks for the notes!  I've attempted a rewrite of that page using the above 
feedback:

  http://openejb.apache.org/unix-daemon.html

It may not yet be perfect.  In particular I didn't add the `-home` note -- more 
because I didn't want to get it wrong.  The page can be edited by anyone by 
clicking the blue pencil icon in the upper right, so contributions are highly 
encouraged.  All changes are reviewed before going live, so don't worry about 
messing anything up.

Thanks again!


-David


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem "J2EE Web Profile support"

2012-05-03 Thread David Blevins

On May 2, 2012, at 11:40 PM, Vogliotti Massimo wrote:

> I downloaded and installed TomEE on my computer and connected it to NetBeans 
> as you suggested, but the error is the same.

The Netbeans crew is currently talking about adding support for TomEE using the 
Tomcat adapter.  Several of the developers are posting that the Tomcat adapter 
works fine already.  I recommend you post your error there to make sure it's on 
their radar.

http://netbeans-org.1045718.n5.nabble.com/72cat-J2EE-Apache-TomEE-1-0-Final-Released-td5677237.html


-David

> -Messaggio originale-
> Da: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Inviato: giovedì 26 aprile 2012 15.58
> A: Tomcat Users List
> Oggetto: Re: Problem "J2EE Web Profile support"
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Max,
> 
> On 4/26/12 4:25 AM, Vogliotti Massimo wrote:
>> Hi, i use NetBeans 7.0.1 with tomcat 7.0.25 integrated. I'm creating a 
>> web application with JSF 2.1 and Java EE 6, when I try to create a 
>> "JSF Pages from entity classes" I get the following error message: 
>> "JSF Pages for Java EE generated sources can not complete without 
>> servers with J2EE Web Profile support.". What can I do?
> 
> Tomcat only implements the servlet specification and IIRC not the full "web 
> profile" of Java EE. I believe that TomEE was created specifically for that 
> purpose: you might want to check them out.
> 
> http://openejb.apache.org/apache-tomee.html
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk+ZVGgACgkQ9CaO5/Lv0PAfeQCgp63ajafqnBclLHw0y7C5nAWF
> o9AAoIc2hycukQvanIvF6mcQ+RWqVIcx
> =qCuB
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] using static helper classes within servlets

2009-06-15 Thread David Blevins


On Jun 15, 2009, at 9:32 AM, Christopher Schultz wrote:


On 6/14/2009 5:43 PM, David Blevins wrote:

Regardless of that choice we
will still handle sychronization of instantiation, so
double-check-locking or other things will not be necessary.


NB: DCL does not work in Java. Period.

http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

There are cases where you /can/ make it work, but let's face it: most
programmers simple cannot be trusted to do it properly. Also, the
techniques are very sensitive to JVM level, etc. so you'd need to  
have a

different implementation depending on which JVM you were running. Yuk.


Chris, I was referring to the EJB 3.1 Singleton bean type which would  
free him up from having to write that complicated code you mention.


-David


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: using static helper classes within servlets

2009-06-14 Thread David Blevins
That's too bad.  A workable solution in EJB 2.1 would be to use a  
stateless bean and set the pool size to 1.  That will effectively give  
you a singleton, though keep in mind it won't be multithreaded so code  
appropriately.


-David

On Jun 14, 2009, at 5:17 PM, Sid Sidney wrote:


Thanks David, but we are stuck with Struts and EJB 2.1 at the moment.

--- On Sun, 6/14/09, David Blevins  wrote:

From: David Blevins 
Subject: Re: using static helper classes within servlets
To: "Tomcat Users List" 
Date: Sunday, June 14, 2009, 5:43 PM

Hey all,

If the goal is to ensure that only one instance is in the webapp,  
I'd recommend the new EJB 3.1 bean type @Singleton which is  
supported in OpenEJB 3.1 and 3.1.1.


  http://openejb.apache.org/3.0/singleton-example.html
  http://openejb.apache.org/singleton-ejb.html

Instantiation can be done at startup or lazily.  All method access  
synchronization is handled for you via  
@ConcurrencyManagement(CONTAINER) or by you  
@ConcurrencyManagement(BEAN).  Regardless of that choice we will  
still handle sychronization of instantiation, so double-check- 
locking or other things will not be necessary.



-David


On Jun 14, 2009, at 11:19 AM, Martin Gainty wrote:



that would be the simplest solution

i *think* the OP wanted a complete EJB jar implementation (using  
either annotations and or ejb-jar.xml)
which can be accomplished with OpenEJB except he would need to know  
the type vis-a-vis Stateless/Stateful Local/Remote beforehand

http://openejb.apache.org/3.0/examples.html

thanks,
Martin
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de  
confidentialité


Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene  
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede  
unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.  
Diese Nachricht dient lediglich dem Austausch von Informationen und  
entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten  
Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den  
Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes  
pas le destinataire prévu, nous te demandons avec bonté que pour  
satisfaire informez l'expéditeur. N'importe quelle diffusion non  
autorisée ou la copie de ceci est interdite. Ce message sert à  
l'information seulement et n'aura pas n'importe quel effet  
légalement obligatoire. Étant donné que les email peuvent  
facilement être sujets à la manipulation, nous ne pouvons accepter  
aucune responsabilité pour le contenu fourni.






Date: Sun, 14 Jun 2009 13:01:31 -0400
Subject: Re: using static helper classes within servlets
From: jhmast.develo...@gmail.com
To: users@tomcat.apache.org

I've not done anything with EJBs and I'm not sure what exactly you  
mean by
static "properties".  I have however dealt with reducing  
instantiations in
servlets.  I simply created a BeanBag class with static methods to  
each one
of my beans; these are not "proper" beans, but where simply  
objects that

were formerly used in JSP via the jsp:useBean directive.

Here is the general pattern:

class BeanBag {
  private static SomeBean someBean = null;

  public static synchronized getSomeBean() {
 if (someBean == null) someBean = new SomeBean();
 return someBean;
 }
}

I have now numerous Servlets, JSPs and POJOs that use BeanBag to  
obtain

singleton instances of my beans.  Its worked great for me.


On Sun, Jun 14, 2009 at 8:28 AM, Sid Sidney   
wrote:






   HI,



In my web app, my servlets user several delegate classes that  
connect

to ejbs (session beans.)  I was thinking
about putting these delegates into a helper class as static  
properties.

That way my servlets can just reference the same delegates. I
don't want to have to create a new instance of a delegate with  
every

request that my servlet(s) handles.



However, I'm wondering if this will cause synchronization issues  
with
multiple requests being handled, as our site handles a heavy load  
of

requests. Any suggestions would be appreciated?





_
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: using static helper classes within servlets

2009-06-14 Thread David Blevins

Hey all,

If the goal is to ensure that only one instance is in the webapp, I'd  
recommend the new EJB 3.1 bean type @Singleton which is supported in  
OpenEJB 3.1 and 3.1.1.


  http://openejb.apache.org/3.0/singleton-example.html
  http://openejb.apache.org/singleton-ejb.html

Instantiation can be done at startup or lazily.  All method access  
synchronization is handled for you via  
@ConcurrencyManagement(CONTAINER) or by you  
@ConcurrencyManagement(BEAN).  Regardless of that choice we will still  
handle sychronization of instantiation, so double-check-locking or  
other things will not be necessary.



-David


On Jun 14, 2009, at 11:19 AM, Martin Gainty wrote:



that would be the simplest solution

i *think* the OP wanted a complete EJB jar implementation (using  
either annotations and or ejb-jar.xml)
which can be accomplished with OpenEJB except he would need to know  
the type vis-a-vis Stateless/Stateful Local/Remote beforehand

http://openejb.apache.org/3.0/examples.html

thanks,
Martin
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de  
confidentialité


Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene  
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede  
unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.  
Diese Nachricht dient lediglich dem Austausch von Informationen und  
entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten  
Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den  
Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes  
pas le destinataire prévu, nous te demandons avec bonté que pour  
satisfaire informez l'expéditeur. N'importe quelle diffusion non  
autorisée ou la copie de ceci est interdite. Ce message sert à  
l'information seulement et n'aura pas n'importe quel effet  
légalement obligatoire. Étant donné que les email peuvent facilement  
être sujets à la manipulation, nous ne pouvons accepter aucune  
responsabilité pour le contenu fourni.






Date: Sun, 14 Jun 2009 13:01:31 -0400
Subject: Re: using static helper classes within servlets
From: jhmast.develo...@gmail.com
To: users@tomcat.apache.org

I've not done anything with EJBs and I'm not sure what exactly you  
mean by
static "properties".  I have however dealt with reducing  
instantiations in
servlets.  I simply created a BeanBag class with static methods to  
each one
of my beans; these are not "proper" beans, but where simply objects  
that

were formerly used in JSP via the jsp:useBean directive.

Here is the general pattern:

class BeanBag {
 private static SomeBean someBean = null;

 public static synchronized getSomeBean() {
if (someBean == null) someBean = new SomeBean();
return someBean;
}
}

I have now numerous Servlets, JSPs and POJOs that use BeanBag to  
obtain

singleton instances of my beans.  Its worked great for me.


On Sun, Jun 14, 2009 at 8:28 AM, Sid Sidney   
wrote:






  HI,



In my web app, my servlets user several delegate classes that  
connect

to ejbs (session beans.)  I was thinking
about putting these delegates into a helper class as static  
properties.

That way my servlets can just reference the same delegates. I
don't want to have to create a new instance of a delegate with every
request that my servlet(s) handles.



However, I'm wondering if this will cause synchronization issues  
with

multiple requests being handled, as our site handles a heavy load of
requests. Any suggestions would be appreciated?





_
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: how to integrate tomcat with open EJB for online money transactions

2009-03-06 Thread David Blevins

I have to agree with the financial transaction advice.

Should you need it for other things, the steps for integrating Tomcat  
and OpenEJB are pretty simple:


  1. Download and unpack Tomcat (any 5.5.x or 6.0.x)
  2. Download the latest openejb.war file and place it into the  
webapps/ directory.

  3. Start Tomcat

You can optionally go the "http://localhost/openejb/"; page and run  
through the installer after step 3 which will install a javaagent  
(only really needed when using OpenJPA on Java 1.5).


-David

On Mar 6, 2009, at 11:20 AM, Rusty Wright wrote:

Go back and read my note to your previous post where I refer to  
CyberSource's Hosted Order Page (HOP) and credit card industry's PCI  
security requirements.  For bed time reading, download the PDF of  
the PCI security requirements (the condensed version will suffice);  
they're breathtaking.


l...@work wrote:
ok.thanks .i will get an expert to help me in this.thank you guys  
for all the

help.
l...@work wrote:

hi mark!

thanks for the kind advice.for your information i am a simple java
programmer with SCJP.and i  lack knowledge in the integration and
production part as i am not exposed to it.but i do have a will to  
learn and the will to execute if given a chance.if you feel that  
my questions
are too simple enough for you to answer you dont have to answer  
them .let
someone who can guide me correctly do so.of course my project is  
my own

and i dont have a deadline :)

markt-2 wrote:

l...@work wrote:

hi,
 i want to integarte tomcat with open ejb.please guide me on  
the
installation steps and which version of EJB and version of  
tomcat is

best
combination.i want to use this for online money transactions.is  
this

method
of integarting tomcat with open ejb simpler than just writing an  
ejb in
jboss and using jboss instead of tomcat.does using jboss alone  
ensure
security of the transaction page or should i use the security  
features

here
again to make the page secure.if any of you have sample code  
please mail

me.
Given the simplicity of the questions you have been asking in  
this area
and the necessity of getting any implementation that involves  
credit
cards right I strongly suggest you identify a suitable expert and  
pay

them to do this for you.

Alternatively, there are plenty of third party providers out  
there you

can use rather than trying to roll your own.

Attempting to do something like this on your own when you  
apparently
lack the necessary skills and experience is asking for trouble  
down the

road.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.x & OpenEJB

2007-04-12 Thread David Blevins


On Apr 12, 2007, at 6:58 AM, Filip Hanik - Dev Lists wrote:


David Blevins wrote:
Plugging into Tomcat 6 doesn't work yet as the classloader  
structure changed just slightly.  It'd likely be just a couple day  
effort to get it in, but we're very busy trying to finish up the  
EJB 3 work (we're really close).  So if you really want it please  
hop on the user or dev list and say so.
I don't think the classloader structure changed, it is still  
defined in catalina.properties


On Apr 12, 2007, at 6:44 AM, Peter Rossbach wrote:
It is true the tomcat 6 default classloader layout has changed. At  
the release bundle all class are
located at common Classloader. You can easly switch to the old  
layout. Please edit the

file conf/catalina.properties and move some files arround :-)


Aha, it's just the default that's changed.  Got it.  I saw via a  
debugger that there was no longer a "Shared" classloader than  
immediately checked the neat little ascii diagram in the 6 docs and  
concluded it was "gone."


Alright, I'll have to poke around via debugger and see if I can't  
find a reliable way to locate the Common classloader regardless if  
there is or isn't a Shared classloader in the mix.  Any suggestions  
are welcome.  If we can get that going the integration with 6 should  
be in working condition with the default Tomcat 6 setup.


Thanks,
David



-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.x & OpenEJB

2007-04-12 Thread David Blevins

On Apr 11, 2007, at 8:21 PM, Filip Hanik - Dev Lists wrote:

http://geronimo.apache.org
they did it :)
filip


:)

Just as a general note, as with OpenEJB 1.0 and before (0.9.x, 0.8.x,  
etc) you can once again plug OpenEJB 3 into Tomcat.  OpenEJB 3 is the  
EJB 3.0 version based on our 1.x code that supports all the same  
feature sets that 1.x and before did, but for once we're actually  
current on the latest greatest spec revision.


Currently, plugging OpenEJB 3 + Tomcat 5.5 works fine but there are a  
couple extra flags you have to set to get CMP to work (our CMP  
container is a layer over JPA), so hop on the OpenEJB user list if  
you want to give it a shot (openejb-users- 
[EMAIL PROTECTED]).


Plugging into Tomcat 6 doesn't work yet as the classloader structure  
changed just slightly.  It'd likely be just a couple day effort to  
get it in, but we're very busy trying to finish up the EJB 3 work  
(we're really close).  So if you really want it please hop on the  
user or dev list and say so.


We're always excited to have more contributors/committers too so if  
this is something you'd like to work on, great!  We're happy to  
include you in the fun.



-David

PS I feel a little spammish writing emails like this, but I hope  
being a fellow Apache project now makes it ok :)




José Perdigão wrote:


Hi,

has anyone been able to integrate OpenEJB with Apache-Tomcat 6.0.x?
Or is it just impossible to do it?



-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to run EJB in Tomcat itself ?

2006-08-08 Thread David Blevins

On Jul 28, 2006, at 11:22 AM, Maurice Yarrow wrote:


Hello Raju

Try OpenEJB, which can be run in both tomcat-embedded mode
(drop their openejb_loader .war into tomcat/webapps)  and
also a detached server  mode.
http://openejb.codehaus.org/download.html

This is an open-source product, and they have a good e-mail
user support  community.  It is a decent product and provides
a good interface between the Java obj's and the beans.
You simply write your beans and your sql, run a tool of
theirs on this, and it creates a bean jar and configuration
file with the sql embedded in it.



Thanks for the comments, Maurice.

Just to add a note on this thread.  The Tomcat/OpenEJB integration  
now runs in three modes.  The first two are as you mentioned: OpenEJB  
beside Tomcat in a separate VM; OpenEJB embedded into Tomcat and  
available to all webapps.  The new third style is OpenEJB embedded  
into a *webapp* and available only to that webapp -- each webapp can  
have it's own private ejb container.  The webapp can even have remote  
ejb clients that communicate with it's ejbs over HTTP.  With this  
style, you don't even have to have a separate ejb archive  -- you  
just add a META-INF/ejb-jar.xml file to your webapp and you're done.


That's pretty much my preferred integration style now.  More details  
here: http://openejb.codehaus.org/Tomcat



-David




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]