Re: App Engine supports Java

2009-04-17 Thread Anjo Krank

There's also always Amazon's EC2...


Yeah, but the nice thing about app engine is that it's *just* app  
server, nothing else. So you don't have to muck with IPs, sys admin,  
configs, updates or whatever. Whereas EC2 is just like a box, you have  
to do everything yourself (but don't have to deal with hardware).


Alas, the environment is too restricted to use even plain WO (or EOF  
with any common DB). One would need to write a new WOAdaptor, not  
create worker threads and then you'd have a single-threaded machine  
that might go down any minute. Given some of my apps almost take 20  
secs to launch, that's not an attractive option... would make a nice  
hack, though :)


Cheers, Anjo



Am 17.04.2009 um 06:44 schrieb Jake MacMullin:


There's also always Amazon's EC2...

http://aws.amazon.com/ec2/

Cheers,

Jake

On Thu, Apr 9, 2009 at 12:34 AM, Anjo Krank a...@krank.net wrote:
http://googleappengine.blogspot.com/

WO in the cloud, anyone?

Cheers, Anjo

PS: And they support Fortran 77, too!
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jmacmullin%40gmail.com

This email sent to jmacmul...@gmail.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Multiple instances of WOA's deployed as WAR's

2009-04-17 Thread Tonny Staunsbrink
Hello
A recent posting said that war file deployment just works (it's not an
exact quote, but that how i remember it).

I've considered deploying WOA's in servlet containers, but there a few
issues i just can't see how they will work
if I run deploy an app to a servlet container cluster.

1) The default session store is memory resident, does WOSession hook into
whatever session distribution i setup
for the containers?

2) The instance number. As far as i can see this property becomes
meaningless when running in servlet containers.
If the session can be distributed, this may not be an issue, but i not

Can help me answering these by sharing their experience with this or link me
in the right direction (before i go experiment with it)?

Cheers
Tonny
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple instances of WOA's deployed as WAR's

2009-04-17 Thread Andrew Lindesay

Hello Tonny;

[Disclaimer; As I said to somebody else off-list recently, I did quite  
a bit of investigation into this in 2005/6, but never got to  
production deployment as the client wanted to stick with wotaskd in  
the end -- so I am speaking from testing / theory]



http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Deployment-Tomcat+Deployment


1) The default session store is memory resident, does WOSession hook  
into whatever session distribution i setup

for the containers?


I don't think that actually works - the sessions are sticky to one  
container.


2) The instance number. As far as i can see this property becomes  
meaningless when running in servlet containers.
If the session can be distributed, this may not be an issue, but i  
not


Correct; and in WO 5.4 I see for example in  
WOContext.completeURLWithRequestHandlerKey(..) the application number  
appearing and I don’t know if this is a good idea with respect to  
systems which should be able to run on wotaskd *AND* servlet.  At the  
very least, it should be noted that this will not work with a servlet  
WebObjects application.  I think the application number should  
absolutely not be depended upon in the general.


If you use, for example, the Apache 2.2 mod_balancer or Apache 1's  
mod_jk, the front-end web-server will load-balance the requests over a  
number of containers -- eg; Jetty or Tomcat.  Each container in the  
cluster gets an identifier (basically an instance number) and if a  
request creates or references a session then the URL's generated will  
contain a path back to the specific container where the session  
lives.  The reference is in the URL like this...


.../MyApp.woa/wo/4.2.13.0;jsessionid=H6qOeduw.7771as1?key=value

...but is ultimately parsed by the load balancer.  This means that  
sessions do not need to be serialised between containers as the  
requests are sticky to specific container.


Although not directly applicable, section 10 of...


http://homepage.mac.com/andrewlindesay/le/manuals/lewostuff/LEWOStuffOverview.pdf

...maybe interesting for you to read over.  It describes an AJP  
adaptor I wrote some years ago which allows a standard WOA to  
integrate into this sort of deployment using the AJP protocol, but the  
same concepts apply to servlet.  Note also that I am fairly sure the  
transport between the front-end web-servers' load-balancers and the  
containers can be HTTP or AJP – this is not AJP specific.


Apache 2.2 also has a balancer manager service which allows you to  
turn containers on and off in terms of routing of traffic.


Put some stuff into or augment the wiki if you take this path.

cheers.

___
Andrew Lindesay
www.lindesay.co.nz

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple instances of WOA's deployed as WAR's

2009-04-17 Thread David Avendasora


On Apr 17, 2009, at 3:26 AM, Tonny Staunsbrink wrote:


Hello

A recent posting said that war file deployment just works (it's  
not an exact quote, but that how i remember it).


Yeah, I think that was me. I should have said:

Simple, single instance servlet deployments just work. If you create a  
basic app and select the servlet options, you'll get a WAR file you  
can deploy to a servlet container without any additional work. It used  
to be quite a bit of messing around just to get a working servlet build.


When you start talking more advanced things like multiple instances  
and such, I think it is still very much a case of lots of things need  
to be done. My servlet deployments are very simple so I have never  
gone that extra mile.


Dave




I've considered deploying WOA's in servlet containers, but there a  
few issues i just can't see how they will work

if I run deploy an app to a servlet container cluster.

1) The default session store is memory resident, does WOSession hook  
into whatever session distribution i setup

for the containers?

2) The instance number. As far as i can see this property becomes  
meaningless when running in servlet containers.
If the session can be distributed, this may not be an issue, but i  
not


Can help me answering these by sharing their experience with this or  
link me in the right direction (before i go experiment with it)?


Cheers
Tonny
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: JavaXML.framework Question

2009-04-17 Thread Dov Rosenberg
The problem has been around since we started deploying apps as servlets
going back several years now. I think it might have something to do with
this snippet I found in the Tomcat docs (
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html)

...
For some classes (such as the XML parser components in J2SE 1.4+), the J2SE
1.4 endorsed feature can be used (see the common classloader definition
above). Last, any JAR containing servlet API classes will be ignored by the
classloader. 
...

The javaxml framework contains javax.servlet.http.* classes. I suspect that
in a servlet deployment this is causing the javaxml framework to be ignored.
These classes are probably needed when running as a regular WOA application
in JavaMonitor if you are using the built in web services functionality. I
am going to try removing them today and see if that helps ­ hopefully the
house of cards wont fall down.


Dov Rosenberg



On 4/17/09 12:40 AM, Jake MacMullin jmacmul...@gmail.com wrote:

 I've encountered this same problem (sans-wonder) when deploying WebObjects
 applications built as WARs to Tomcat, JBoss (with a Tomcat servlet container)
 and Glassfish application servers - though not with Jetty.
 
 I'd really like to know more about what might be causing this problem and what
 the solution is. I suspect that it might be due to incompatibilities between
 versions of java libraries included within the javaxml.jar and different
 versions of the same libraries provided by the various application servers.
 I'm currently seeing if I can figure out exactly what is causing this problem
 as it is a serious issue if we're unable to deploy to JBoss/Tomcat as that's
 our current server set-up.
 
 I first noticed this problem with WO 5.4.x (sans-wonder).
 
 Regards,
 
 Jake
 
 On Wed, Apr 15, 2009 at 2:18 AM, Dov Rosenberg drosenb...@inquira.com wrote:
 Yes, we have swapped over to Wonder a few months ago. I have run into this
 prior to Wonder though.
 
 Dov
 
 
 
 On 4/14/09 12:01 PM, David Avendasora webobje...@avendasora.com
 http://webobje...@avendasora.com  wrote:
 
 Hi Dov,
 
 Are you using Wonder with your Tomcat servlet apps? I've run into some
 classpath weirdness with running the two together. The weirdness I see is
 different from what you are running into, but maybe they are related...
 
 Dave
 
 On Apr 14, 2009, at 11:39 AM, Dov Rosenberg wrote:
 
  We deploy our apps as servlets in Tomcat. We have been deploying them that
 way for the past few years. Recently I have been updating our build scripts
 to steamline them. For some reason even though we include the javaxml.jar
 (from the JavaXML.framework) in our WEB-INF/lib folder the Tomcat class
 loader can¹t seem to find classes that I can see in the jar. For example at
 startup if I don¹t include xercesImpl.jar in my WEB-INF/lib along side
 javaxml.jar I will see the following error
  
  java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat:
 org/apache/xml/serialize/OutputFormat
  
  That class is in both the xercesImpl and javaxml.jar¹s
  
  The same seems to apply for the xalan, axis, wsdl, etc classes. Should we
 be deploying the JavaXML.framework at all? It seems that if we do not the
 webservices functionality built into WebObjects gets broken. Seems like a
 waste to deploy all of these duplicate wars.
  
  Thanks in advance for any feedback
  
  
  Dov Rosenberg
    ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com
 http://Webobjects-dev@lists.apple.com )
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendaso
 ra.com
 
 This email sent to webobje...@avendasora.com
 http://webobje...@avendasora.com
 
 
 
  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/jmacmullin%40gmail.com
 
 This email sent to jmacmul...@gmail.com
 
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: JavaClient offline storage / replication

2009-04-17 Thread Jean-Francois Veillette


Le 09-04-16 à 07:50, Anjo Krank a écrit :

You could probably also serialize Adaptor ops that occur after  
ec.saveChanges() using sth like the ERXAdaptorOperationWrapper and  
have some custom code dealing with conflicts. At least this would  
allow you to handle things in code, not in SQL.


I had to sync 2 deployement site of the same WO app.  It didn't have  
to be real time, just sync at will.  So my first thought was to save  
operation on one site, transfert them on the other site and reapply  
them over there.

I have part of it implemented, only the 'saving' part.

It simply a delegete that implement  
databaseContextWillPerformAdaptorOperations(...), iterate over the  
list of operations and create new EOAdaptorOperation that save a  
serialized version of desired operations.


Here is a code snippet :

	public NSArray databaseContextWillPerformAdaptorOperations(final  
EODatabaseContext dbCtxt, final NSArray adaptorOps, final  
EOAdaptorChannel adChannel) {

NSMutableArray results = new NSMutableArray();
log.info(!! databaseContextWillPerformAdaptorOperations: );
log.info(adaptorOps);
log.info(---);
Enumeration enim = adaptorOps.objectEnumerator();
//WOXMLCoder coder = WOXMLCoder.coder();
		XStream xstream = new XStream(new DomDriver()); // does not require  
XPP3 library

EOEditingContext ec = new EOEditingContext();
		EOEntity entityTransaction = EOUtilities.entityNamed(ec,  
Transaction.NomEntite);
		EOEntity entityOperation = EOUtilities.entityNamed(ec,  
Operation.NomEntite);
		Object transactionPk = sequenceClefPrimairePourEntite(adChannel,  
entityTransaction, Transaction.ClefPk);
		Object[] transactionObjs = { Transaction.CodeStatut_Genere, new  
NSTimestamp(), Site.clefSiteCourant(), transactionPk };
		NSDictionary transactionValues = new NSDictionary(transactionObjs,  
transactionKeys);
		EOAdaptorOperation transactionAdaptorOp = new  
EOAdaptorOperation(entityTransaction);

transactionAdaptorOp.setAdaptorOperator(1);
transactionAdaptorOp.setChangedValues(transactionValues);
results.addObject(transactionAdaptorOp);
while (enim.hasMoreElements()) {
EOAdaptorOperation op = (EOAdaptorOperation) 
enim.nextElement();
results.addObject(op);
ERXAdaptorOperationWrapper wrap = new 
ERXAdaptorOperationWrapper(op);
String xml = xstream.toXML(wrap);
log.info(xml);
			Object operationPk = sequenceClefPrimairePourEntite(adChannel,  
entityOperation, Operation.ClefPk);
			Object[] objs = { Operation.CodeStatut_Genere, op.entity().name(),  
xml, operationPk, transactionPk };

NSDictionary values = new NSDictionary(objs, 
operationKeys);
			EOAdaptorOperation adaptorOp = new  
EOAdaptorOperation(entityOperation);

adaptorOp.setAdaptorOperator(1);
adaptorOp.setChangedValues(values);
results.addObject(adaptorOp);
}
return results;
}

It does work in the sense that operations does get serialized and  
saved to the bd.  But I never push this pet project further so that I  
never got it to transfert and sync over 2 deployement sites.  So it  
was never really tested,  it's more at the state of a prototype  
actually more than anything else.


The model is simple, 3 entities :  Site, Operation and Transaction
Site -- Transaction
Transaction -- Operations

If you would like to take a look at it, let me know, I can send it  
all, it was all done on my spare time for a non-profit organisation.


- jfv



Cheers, Anjo


Am 16.04.2009 um 04:44 schrieb John Ours:

My main concern with trying this with WebObjects would be, as  
others have said, trying to sync the persistence layers.  Even if  
you could get it to work it would be horribly inefficient.  In  
every system we've ever built like this we've handled the data sync  
at the database level through either OTS or custom replication.   
Hypothetically this approach should work with WO...the clients  
always write locally and the sync is database-to-database whenever  
a connection becomes available.

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Multiple instances of WOA's deployed as WAR's

2009-04-17 Thread Dov Rosenberg
We have been deploying our apps out as servlets for a few years now with
many of our larger customers having large numbers of instances. Here is some
things we have learned over that time:

* Deploying as servlets means that you can only have 1 instance per servlet
container. In order to scale you need to deploy multiple servlet containers.
In our case for large servers with plenty of RAM and CPU we may run 2 or 3
Tomcat servers on the same box all on different ports. We use the JK adaptor
or other external load balancers to balance across all running Tomcat
instances. 
* As long as each WO app being deployed on a single Tomcat server has a
different context name, you can deploy multiple WO apps on a single Tomcat
server. For example, we deploy a management console, a web service app, and
a WO based JSP tag library app in the same servlet container.
* Be aware that all WO apps running in the same servlet container share the
same RAM. On 32bit Windows platforms that typically is around 1.4G.
* Even though Tomcat is multi-threaded, the WO EOF stack is much less so. It
is necessary to scale by adding instances of Tomcat and your app. Project
Wonder has been a big help in minimizing our locking issues in these multi
threaded environments
* We don¹t/can¹t use JavaMonitor. We use the Java Service Wrapper (
http://wrapper.tanukisoftware.org/doc/english/download.jsp) to launch and
monitor our apps. We built a custom page to display the WOStats in our app.
* We don¹t use the WO JSP tags to display WOComponents in JSP pages. Seems
interesting, but never tried it.
* We turned off session persistance in Tomcat. The persisted sessions are
basically unusable and only cause problems when our apps get restarted.
* We rely on Tomcat clustering if we need it.
* You will get errors like: javax.naming.NameNotFoundException: Name jdbc is
not bound in this Context when starting up if you do not use a content.xml
and turn off JNDI naming. The app still starts up properly and runs fine,
but it will throw those errors once per connection. I haven¹t bothered to
figure out how to use JNDI with our WO apps. Mainly because we only used a
single ObjectStoreCoordinator per instance.
* The session time out is set in the WEB-INF/web.xml. The WOServletAdaptor
seems to attach itself to the Tomcat Session such that they share the same
lifecycle. 
* The WebObjects classloader is configured in the WEB-INF/web.xml under the
WOCLASSPATH context parameter. It is a separate class loader than the ones
provided by the Tomcat server. We only put the WO related jars (from the WO
runtime and our frameworks and apps) in there. All of the other dependent
jars go in the WEB-INF/lib. We don¹t bundle any extra jars inside our
frameworks to avoid duplicates. Tomcat provides jars like log4j, etc but we
bundle our own so we don¹t have any external dependencies. The newer WO
runtime files are delivered as Jars instead of Frameworks ­ we deploy those
in the WEB-INF/lib but register them in the WEB-INF/web.xml. Our Project
Wonder jars still need to be deployed as Frameworks.
* There is no built in load balancing in the WOServletAdaptor like there is
in the regular WOAdaptors. The machine name stuff is meaningless. The
sessions are sticky based on the JSESSIONID that the Tomcat container
provides 
* We deploy our database drivers in the WEB-INF/lib folder of our WARs. That
way we control what drivers are being used.
* The WO apps need to run as expanded WARs in order to resolve the variables
in the WEB-INF/web.xml (i.e. WEBINFROOT). Not sure why, but I suspect it is
because the bootstrapping process needs to see the environment directly.
WARs are typically expanded in Tomcat by default. Other containers such as
WebLogic do not expand them by default causing issues. The J2EE spec says
either way is acceptable but they lean toward not expanding them ­ which
causes us issues. 
* Resource resolution is slightly different between a regular WO app and a
WO app deployed as a servlet. The WOContext is different (WOServletContext)
as well as WORequest, WOResponse.
* The WebObjects servlet is still in the URL i.e.
http://myapp.com/MyStore/WebObjects/store.woa. You can use URL rewriting to
remove it if you want or I think there is some functionality in Project
Wonder to rename it.
* We found it easier to pass the session id in the URL in most cases.

Hope that helps people. Overall I like deploying WO inside the servlet
containers. Customers are very comfortable with servlet containers and have
a lot less concern than deploying on a proprietary app server engine. There
are some limitations but they are not that bad. It is a whole lot easier
deploying a single WAR than it is sending someone a bunch of files and
hoping they put them in the right place.

Dov Rosenberg


On 4/17/09 6:19 AM, David Avendasora webobje...@avendasora.com wrote:

 
 On Apr 17, 2009, at 3:26 AM, Tonny Staunsbrink wrote:
 
 Hello
 
 A recent posting said that war file deployment just works (it's
 not 

Re: JavaXML.framework Question

2009-04-17 Thread Mike Schrag
My guess is that it's because javaxml.jar includes servlet.jar inside  
of it, and the j2ee rules say this is a nono ... I believe if you look  
closely at the startup console log, you might see that your j2ee  
container removes javaxml from your classpath because of that  
violation?  I have a vague recollection of this, at least.  JavaXML is  
pretty evil and really shouldn't exist.  You don't actually need it --  
it's just a pile of prebuilt jars ... Especially if you're using  
maven, you should really unroll it and add the individual dependencies  
instead.


ms

On Apr 17, 2009, at 12:40 AM, Jake MacMullin wrote:

I've encountered this same problem (sans-wonder) when deploying  
WebObjects applications built as WARs to Tomcat, JBoss (with a  
Tomcat servlet container) and Glassfish application servers - though  
not with Jetty.


I'd really like to know more about what might be causing this  
problem and what the solution is. I suspect that it might be due to  
incompatibilities between versions of java libraries included within  
the javaxml.jar and different versions of the same libraries  
provided by the various application servers. I'm currently seeing if  
I can figure out exactly what is causing this problem as it is a  
serious issue if we're unable to deploy to JBoss/Tomcat as that's  
our current server set-up.


I first noticed this problem with WO 5.4.x (sans-wonder).

Regards,

Jake

On Wed, Apr 15, 2009 at 2:18 AM, Dov Rosenberg  
drosenb...@inquira.com wrote:
Yes, we have swapped over to Wonder a few months ago. I have run  
into this prior to Wonder though.


Dov



On 4/14/09 12:01 PM, David Avendasora webobje...@avendasora.com  
wrote:


Hi Dov,

Are you using Wonder with your Tomcat servlet apps? I've run into  
some classpath weirdness with running the two together. The  
weirdness I see is different from what you are running into, but  
maybe they are related...


Dave

On Apr 14, 2009, at 11:39 AM, Dov Rosenberg wrote:

We deploy our apps as servlets in Tomcat. We have been deploying  
them that way for the past few years. Recently I have been updating  
our build scripts to steamline them. For some reason even though we  
include the javaxml.jar (from the JavaXML.framework) in our WEB-INF/ 
lib folder the Tomcat class loader can’t seem to find classes that I  
can see in the jar. For example at startup if I don’t include  
xercesImpl.jar in my WEB-INF/lib along side javaxml.jar I will see  
the following error


 java.lang.NoClassDefFoundError: org/apache/xml/serialize/ 
OutputFormat: org/apache/xml/serialize/OutputFormat


 That class is in both the xercesImpl and javaxml.jar’s

 The same seems to apply for the xalan, axis, wsdl, etc classes.  
Should we be deploying the JavaXML.framework at all? It seems that  
if we do not the webservices functionality built into WebObjects  
gets broken. Seems like a waste to deploy all of these duplicate wars.


 Thanks in advance for any feedback


 Dov Rosenberg
   ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com



 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jmacmullin%40gmail.com

This email sent to jmacmul...@gmail.com

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Multiple instances of WOA's deployed as WAR's

2009-04-17 Thread Mike Schrag

looks like a wiki page to me if i ever saw one :)

On Apr 17, 2009, at 8:20 AM, Dov Rosenberg wrote:

We have been deploying our apps out as servlets for a few years now  
with many of our larger customers having large numbers of instances.  
Here is some things we have learned over that time:


Deploying as servlets means that you can only have 1 instance per  
servlet container. In order to scale you need to deploy multiple  
servlet containers. In our case for large servers with plenty of RAM  
and CPU we may run 2 or 3 Tomcat servers on the same box all on  
different ports. We use the JK adaptor or other external load  
balancers to balance across all running Tomcat instances.
As long as each WO app being deployed on a single Tomcat server has  
a different context name, you can deploy multiple WO apps on a  
single Tomcat server. For example, we deploy a management console, a  
web service app, and a WO based JSP tag library app in the same  
servlet container.
Be aware that all WO apps running in the same servlet container  
share the same RAM. On 32bit Windows platforms that typically is  
around 1.4G.
Even though Tomcat is multi-threaded, the WO EOF stack is much less  
so. It is necessary to scale by adding instances of Tomcat and your  
app. Project Wonder has been a big help in minimizing our locking  
issues in these multi threaded environments
We don’t/can’t use JavaMonitor. We use the Java Service Wrapper ( http://wrapper.tanukisoftware.org/doc/english/download.jsp) 
 to launch and monitor our apps. We built a custom page to display  
the WOStats in our app.
We don’t use the WO JSP tags to display WOComponents in JSP pages.  
Seems interesting, but never tried it.
We turned off session persistance in Tomcat. The persisted sessions  
are basically unusable and only cause problems when our apps get  
restarted.

We rely on Tomcat clustering if we need it.
You will get errors like: javax.naming.NameNotFoundException: Name  
jdbc is not bound in this Context when starting up if you do not use  
a content.xml and turn off JNDI naming. The app still starts up  
properly and runs fine, but it will throw those errors once per  
connection. I haven’t bothered to figure out how to use JNDI with  
our WO apps. Mainly because we only used a single  
ObjectStoreCoordinator per instance.
The session time out is set in the WEB-INF/web.xml. The  
WOServletAdaptor seems to attach itself to the Tomcat Session such  
that they share the same lifecycle.
The WebObjects classloader is configured in the WEB-INF/web.xml  
under the WOCLASSPATH context parameter. It is a separate class  
loader than the ones provided by the Tomcat server. We only put the  
WO related jars (from the WO runtime and our frameworks and apps) in  
there. All of the other dependent jars go in the WEB-INF/lib. We  
don’t bundle any extra jars inside our frameworks to avoid  
duplicates. Tomcat provides jars like log4j, etc but we bundle our  
own so we don’t have any external dependencies. The newer WO runtime  
files are delivered as Jars instead of Frameworks – we deploy those  
in the WEB-INF/lib but register them in the WEB-INF/web.xml. Our  
Project Wonder jars still need to be deployed as Frameworks.
There is no built in load balancing in the WOServletAdaptor like  
there is in the regular WOAdaptors. The machine name stuff is  
meaningless. The sessions are sticky based on the JSESSIONID that  
the Tomcat container provides
We deploy our database drivers in the WEB-INF/lib folder of our  
WARs. That way we control what drivers are being used.
The WO apps need to run as expanded WARs in order to resolve the  
variables in the WEB-INF/web.xml (i.e. WEBINFROOT). Not sure why,  
but I suspect it is because the bootstrapping process needs to see  
the environment directly. WARs are typically expanded in Tomcat by  
default. Other containers such as WebLogic do not expand them by  
default causing issues. The J2EE spec says either way is acceptable  
but they lean toward not expanding them – which causes us issues.
Resource resolution is slightly different between a regular WO app  
and a WO app deployed as a servlet. The WOContext is different  
(WOServletContext) as well as WORequest, WOResponse.
The WebObjects servlet is still in the URL i.e. http://myapp.com/MyStore/WebObjects/store.woa 
. You can use URL rewriting to remove it if you want or I think  
there is some functionality in Project Wonder to rename it.

We found it easier to pass the session id in the URL in most cases.

Hope that helps people. Overall I like deploying WO inside the  
servlet containers. Customers are very comfortable with servlet  
containers and have a lot less concern than deploying on a  
proprietary app server engine. There are some limitations but they  
are not that bad. It is a whole lot easier deploying a single WAR  
than it is sending someone a bunch of files and hoping they put them  
in the right place.


Dov Rosenberg


On 4/17/09 6:19 AM, 

Re: Multiple instances of WOA's deployed as WAR's

2009-04-17 Thread David Avendasora

Dov,

This is really excellent! Do you mind if I put this up on the Wiki as  
a general WebObjects with Servlets informational page?


With that said, I do have some questions for you about this. See below

On Apr 17, 2009, at 8:20 AM, Dov Rosenberg wrote:

We have been deploying our apps out as servlets for a few years now  
with many of our larger customers having large numbers of instances.  
Here is some things we have learned over that time:


Deploying as servlets means that you can only have 1 instance per  
servlet container. In order to scale you need to deploy multiple  
servlet containers. In our case for large servers with plenty of RAM  
and CPU we may run 2 or 3 Tomcat servers on the same box all on  
different ports. We use the JK adaptor or other external load  
balancers to balance across all running Tomcat instances.
Can you provide some more detail about how to set this up? Is it  
similar to what Andrew Lindesay has documented on the Wiki already?
As long as each WO app being deployed on a single Tomcat server has  
a different context name, you can deploy multiple WO apps on a  
single Tomcat server. For example, we deploy a management console, a  
web service app, and a WO based JSP tag library app in the same  
servlet container.
This is exactly the setup I have. I have 3 distinct WO apps running in  
one Tomcat 6.0 instance. I run into problems with the classloader  
trying to load frameworks that only exist in one project into another.  
I have to include all the frameworks used by all three apps in all  
three otherwise if the one that loads last doesn't have the frameworks  
required by one of the previous apps, it will fail. I'm not sure if it  
is a problem involving Wonder, or if it does it for plain WO apps too.
Be aware that all WO apps running in the same servlet container  
share the same RAM. On 32bit Windows platforms that typically is  
around 1.4G.
Even though Tomcat is multi-threaded, the WO EOF stack is much less  
so. It is necessary to scale by adding instances of Tomcat and your  
app. Project Wonder has been a big help in minimizing our locking  
issues in these multi threaded environments
We don’t/can’t use JavaMonitor. We use the Java Service Wrapper ( http://wrapper.tanukisoftware.org/doc/english/download.jsp) 
 to launch and monitor our apps. We built a custom page to display  
the WOStats in our app.
So you use this instead of using the Tomcat Manager application? Not  
that I've ever gotten it to start and stop individual WO apps anyway.  
I always have had to restart the whole container. It's a pain in the  
butt, but not so much of one that I've ever tried to figure out why.
We don’t use the WO JSP tags to display WOComponents in JSP pages.  
Seems interesting, but never tried it.
We turned off session persistance in Tomcat. The persisted sessions  
are basically unusable and only cause problems when our apps get  
restarted.
How do you turn that off. I've never looked for it but it is annoying  
to get a bunch of errors at boot.

We rely on Tomcat clustering if we need it.
You will get errors like: javax.naming.NameNotFoundException: Name  
jdbc is not bound in this Context when starting up if you do not use  
a content.xml and turn off JNDI naming. The app still starts up  
properly and runs fine, but it will throw those errors once per  
connection. I haven’t bothered to figure out how to use JNDI with  
our WO apps. Mainly because we only used a single  
ObjectStoreCoordinator per instance.
I get these too, but I never used to. The only thing I can think of  
that changed is that I used to define the connections in the  
context.xml file. I quit using that file. I don't know if that is what  
is now causing the error messages, but the timing seems to be  
coincidental.
The session time out is set in the WEB-INF/web.xml. The  
WOServletAdaptor seems to attach itself to the Tomcat Session such  
that they share the same lifecycle.
Do you let WOLips auto-generate the web.xml file for you? If so, how  
do you manually control this value? Again, I've never tried, but it's  
been on my low-priority todo list forever.
The WebObjects classloader is configured in the WEB-INF/web.xml  
under the WOCLASSPATH context parameter. It is a separate class  
loader than the ones provided by the Tomcat server. We only put the  
WO related jars (from the WO runtime and our frameworks and apps) in  
there. All of the other dependent jars go in the WEB-INF/lib. We  
don’t bundle any extra jars inside our frameworks to avoid  
duplicates. Tomcat provides jars like log4j, etc but we bundle our  
own so we don’t have any external dependencies. The newer WO runtime  
files are delivered as Jars instead of Frameworks – we deploy those  
in the WEB-INF/lib but register them in the WEB-INF/web.xml. Our  
Project Wonder jars still need to be deployed as Frameworks.
There is no built in load balancing in the WOServletAdaptor like  
there is in the regular WOAdaptors. The machine 

Re: JavaClient offline storage / replication

2009-04-17 Thread Anjo Krank

Am 17.04.2009 um 13:47 schrieb Jean-Francois Veillette:

If you would like to take a look at it, let me know, I can send it  
all, it was all done on my spare time for a non-profit organisation.


Me? No thanks :)

My original task was to sync 2 sites using - get this - email (No, I  
couldn't use anything else, it HAD to be email). I ended up with using  
JMS to halfway maintain queue integrity. It actually worked and  
because each site only had their own change sets with their own PKs  
(this is what the host flag in ERXLongPKFactory is for), conflicts  
were minimal and easy to sort out. But it was still a nightmare and  
I'm glad they now listened to reason :)


Cheers, Anjo




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: wotaskd password

2009-04-17 Thread Mr. Frank Cobia
I will give it another try over the next few days and see if maybe it  
was some other problem I was having.


Frank

On Apr 16, 2009, at 3:20 PM, Mark Ritchie wrote:


On 16-Apr-09, at 2:54 PM, Chuck Hill wrote:

You might also be thinking of this (unrelated) section in
/System/Library/WebObjects/Adaptors/Apache2.2/apache.conf

# To enable the WOAdaptorInfo page with restricted access,
# uncomment the next two lines and set the user and password
# To access the WOAdaptorInfo page with restricted access,
# use a URL like: http://webserver/cgi-bin/WebObjects/WOAdaptorInfo?user+password 
.

# WebObjectsAdminUsername user
# WebObjectsAdminPassword password


Hey Chuck!

That's a good point!  Perhaps Frank is mixing them up?  Either way,  
enabling the WOAdaptorInfo page and turning on adaptor logging are  
vital to tracking down why it's not working!   For example, on that  
solaris problem with Apache2 and Apache2.2, turned out that  
Apache2.2 required fqdn for the app servers where as Apache2 did  
not.  Weird shit but then there were multiple virtual hosts and  
external vs internal addresses so were lots of opportunity for  
confusion.  It was resolved by looking at the adaptor logs which  
clearly show'd the problem.


Regards,
M.
__
Mark Ritchie
Cocoa and WebObjects Developer
Diamond Lake Consulting Inc.
Toronto, Ontario, Canada



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/frank.cobia%40f2technology.com

This email sent to frank.co...@f2technology.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: JavaClient offline storage / replication

2009-04-17 Thread Jean-Francois Veillette
My original task was to sync 2 sites using - get this - email (No, I  
couldn't use anything else, it HAD to be email). I ended up with  
using JMS to halfway maintain queue integrity. It actually worked  
and because each site only had their own change sets with their own  
PKs (this is what the host flag in ERXLongPKFactory is for),  
conflicts were minimal and easy to sort out. But it was still a  
nightmare and I'm glad they now listened to reason :)


Very interesting !  Nice to see someone actually build a solution for  
this kind of problem !
I'm currious, do you have an automated mail reader that automatically  
'import' change set ?  does it need manual intervention ?

Can you elaborate a little bit, just enough so I get the big picture.

- jfv



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: JavaClient offline storage / replication

2009-04-17 Thread Anjo Krank


Am 17.04.2009 um 15:59 schrieb Jean-Francois Veillette:

My original task was to sync 2 sites using - get this - email (No,  
I couldn't use anything else, it HAD to be email). I ended up with  
using JMS to halfway maintain queue integrity. It actually worked  
and because each site only had their own change sets with their own  
PKs (this is what the host flag in ERXLongPKFactory is for),  
conflicts were minimal and easy to sort out. But it was still a  
nightmare and I'm glad they now listened to reason :)


Very interesting !  Nice to see someone actually build a solution  
for this kind of problem !
I'm currious, do you have an automated mail reader that  
automatically 'import' change set ?  does it need manual  
intervention ?

Can you elaborate a little bit, just enough so I get the big picture.


A bit, as I don't care to remember this in too much detail :)  
Actually, it looked like I pulled out the JMS as openJMS wasn't too  
stable to begin with and used my own tiny queue implementation.


I had what you had: SyncQueue (name, messages) + SyncMessage (queue,  
payload, reponse, sequence no)


Also as I had images and changes to sync, I had 6 queues:

Master:
- create one Sender for the images
- create one Sender for the master queue
- create one Receiver for the client queue

Client:
- create one Sender for the client queue
- create one Receiver for the master queue
- create one Receiver for the images

EC changes get sent into the outbound queue, then sent as mail. Client  
reads items (IMAP), if it's out of order, waits until he gets the  
correct number. There was an interface to resend. Client gets payload,  
execs items. Last write wins, changes are merged, conflicts are  
reported. Deleted are ignored. Client write receipt, master reads it  
and marks the item as done (result as text).


The rest I can't remember (except telling them that when push comes to  
shove, they have to start fresh and the whole thing is a terrible idea  
to begin with)


Cheers, Anjo
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


ERXObjectStoreCoordinator and database channels

2009-04-17 Thread Jarosław Barcewicz

Hi,
I have application that allows user to make searches over database that 
can last for few minutes. Using WOLongResponsePage user can see some 
time counting :D when his query is executed. Query is custom created and 
fired by EOUtilities.rawRowsForSQL. Problem is, that new user (new 
session just created) cannot log in even see start page.


I've tried some solutions passed here. One that works is to create 
ERXObjectStoreCoordinator per session. This works, but when I was 
testing it simulating many users (about 100) database connection pool 
ends and application still wanted to create new ones. In session 
constructor I use:



ERXObjectStoreCoordinator objectStoreCoordinator = new 
ERXObjectStoreCoordinator();

EOEditingContext editingContext = ERXEC.newEditingContext();
setDefaultEditingContext(editingContext)


If I don't create ERXObjectStoreCoordinator, new user with new session 
cannot use db during database channel is occupied by searching thread 
and new db channel is not created. I thought that database connections 
are created when all from pool are busy, when some are free - session 
uses them. How to manage such situation, maybe I misunderstand something?


I tried to follow the instruction of Miguel Arroz from 
http://terminalapp.net/dr-optimistic-locking/ but setting 
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators to some 
value changes nothing.


Could you explain me how to use, in simplest case, 
ERXObjectStoreCoordinatorPool, ERXObjectStoreCoordinator and 
ERXObjectStoreCoordinatorSynchronizer? I can't figure out how to use 
them together.


Thanks in advance, :D
Jarek

--
Jaroslaw Barcewicz
Software Developer
Power Media S.A.
http://www.power.com.pl

District Court for Wroclaw-Fabryczna
KRS: 281947
NIP: PL-898-16-47-572
Capital stock: 640 000 PLN


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


AjaxModalContainer help...

2009-04-17 Thread Theodore Petrosky

I am attempting to use this wonderful Wonder stuff...

I have a table and I want the user to be able to mark rows as deleted. Actually 
they are updating the row and setting the isDeleted boolean to true and saving 
the row.

I am trying to use the AjaxModalContainer to show the currently selected row. I 
have used the AjaxExample2 as  a template for the container. So far the user 
can click the delete column and the AjaxModalContainer comes up...


DeleteContact : AjaxModalContainer {
ajax = true;
id = current.companyName;
label = delete;
 
}

Here is the row/column to delete the record:

webobject name = DeleteContact
wo:AjaxUpdateContainer
wo:form
bDelete Company/b
p
wo:WOString value = $current.companyName size = 30 /
wo:AjaxSubmitButton action = $deleteContact value = Delete 
updateContainerID = tableBody /
/p
/wo:form
/wo:AjaxUpdateContainer
/webobject

My problem is that the modal dialog is not dismissing after the user clicks the 
delete button. (the current record is indeed marked as deleted. Here is the 
java:

public WOActionResults deleteContact() {
NSLog.out.appendln(top of deleteContact +);
dg.setSelectedObject(current);
dg.selectedObject().setIsDeleted(true);
try {
contactEO.saveChanges();
//jobListEO.saveChangesInEditingContext(jobListEO);
} catch (ValidationException e) {
NSLog.out.appendln(ValidationException e =  + e.getMessage());

} catch (EOGeneralAdaptorException e) {
NSLog.out.appendln(EOGeneralAdaptorException e =  + e.getMessage());
}

contactList = null;
contactList = Contact.fetchNotDeleted(contactEO);
dg.setObjectArray(contactList);
//this.sortByCompany(); //so it has an initial value
current = null;
dg.setSelectedObject(null);
dg.qualifyDisplayGroup();

deleteContactBoolean = false;
return null;
}

Why doesn't this dialog dismiss when you click the submit button

Ted





  
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


JavaClient: does the eomodel file need to be included with the client app?

2009-04-17 Thread John Huss
In JavaClient does the eomodel file need to be included with the client
app?  Or just on the server as usual?

John
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ERXObjectStoreCoordinator and database channels

2009-04-17 Thread Chuck Hill


On Apr 17, 2009, at 7:38 AM, Jarosław Barcewicz wrote:


Hi,
I have application that allows user to make searches over database  
that can last for few minutes. Using WOLongResponsePage user can see  
some time counting :D when his query is executed. Query is custom  
created and fired by EOUtilities.rawRowsForSQL. Problem is, that new  
user (new session just created) cannot log in even see start page.


If you are dispatching requests concurrently, they should at least be  
able to get to the start page.  But that won't be of any benefit.



I've tried some solutions passed here. One that works is to create  
ERXObjectStoreCoordinator per session. This works, but when I was  
testing it simulating many users (about 100) database connection  
pool ends and application still wanted to create new ones. In  
session constructor I use:



ERXObjectStoreCoordinator objectStoreCoordinator = new  
ERXObjectStoreCoordinator();

EOEditingContext editingContext = ERXEC.newEditingContext();
setDefaultEditingContext(editingContext)


Yes, that can have bad results with memory usage and database  
connection usage.



If I don't create ERXObjectStoreCoordinator, new user with new  
session cannot use db during database channel is occupied by  
searching thread and new db channel is not created. I thought that  
database connections are created when all from pool are busy, when  
some are free - session uses them. How to manage such situation,  
maybe I misunderstand something?


The above code automatically creates new ones.  You will probably be  
better off creating a pool for the long running searches and leave the  
normal session processing untouched.



I tried to follow the instruction of Miguel Arroz from http://terminalapp.net/dr-optimistic-locking/ 
 but setting  
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators to some  
value changes nothing.


Does you Application extend ERXApplication and Session extend  
ERXSession?




Could you explain me how to use, in simplest case,  
ERXObjectStoreCoordinatorPool, ERXObjectStoreCoordinator and  
ERXObjectStoreCoordinatorSynchronizer? I can't figure out how to use  
them together.


I don't use those, but managing a simple pool yourself for the long  
running searches might be easier.  Even if you use  
ERXObjectStoreCoordinatorPool, you are still going to want a new EOF  
stack for the long searches.  You should probably concentrate on that  
problem first.



Chuck




Thanks in advance, :D
Jarek

--
Jaroslaw Barcewicz
Software Developer
Power Media S.A.
http://www.power.com.pl

District Court for Wroclaw-Fabryczna
KRS: 281947
NIP: PL-898-16-47-572
Capital stock: 640 000 PLN


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net



--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects






___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


EOSQLQualifier replacement

2009-04-17 Thread Tom Pelaia

Hi,

We are using a CLOB to store some data and I need to search on it  
using the Oracle contains operation, but we also have several other  
fields which are used to qualify the search. I am already using EO  
Qualifiers to perform the search on the other parameters, but now I  
see that I need something like EOSQLQualifier to handle the CLOB.  
However, that class is deprecated, and the alternatives listed don't  
seem to be ideal since that would require me to rewrite the entire  
qualification using raw SQL. I would like to preserve the my current  
qualifier architecture.


Any suggestions?

thanks,
tom
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Help me choose topics for WOWODC'09

2009-04-17 Thread Chuck Hill
I am considering a few topics (thinking to only do one) for WOWODC'09  
in San Fran this June.  I'd appreciate some feedback on which ones are  
of the widest interest.



1. Testing
Someone else is going to be doing a session on testing covering TDD,  
Mocks, Example Objects, Acceptance/Integration/Unit tests, Demo of  
building an application with TDD.  Is there enough interest in a  
second session?  I'd plan to cover:


- using TestNG for unit testing (focus on the mechanics of using  
TestNG vs JUnit)


- functional testing with Selenium without using ERSelenium (focusing  
more
on the functional side than on the developer driven side, how to work  
with

the business folks to create functional and acceptance tests)

- writing and using extensions to SeleniumIDE and SeleniumCore

- generating and interpreting test coverage reports from EMMA

- using JMeter to load test WO apps




2. EOF from Form Submission to Save Complete
A detailed look at what happens from when a form value comes in at  
takeValuesFromRequest, through validation, sending the SQL to the  
database, handling returned exceptions, and propagating change  
notifications.  This might be a really evil one to prepare for if I go  
into full detail.




3. Leveraging EOF Validation and WO Components
- extending EOF's validation (GVC, Wonder, Validity approaches)
- dealing with an EOGeneralAdaptorException in a user friendly way
- getting pages and components to manage recording and displaying  
validation messages without you needing to get involved (aka  
WOComponent 2.0)



Other requests will be entertained.  :-)


Chuck


--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


WOWODC'09 - Bring out your puzzlers!

2009-04-17 Thread Chuck Hill
There is some interest in a reprise of last years entertaining WO  
Puzzlers session:

http://www.wocommunity.org/wowodc08/sessions/wopuzzlers.html

The problem is that I don't have enough of them noted down.  If you  
have some odd WO related situations that you encountered, and you are  
willing to share, send them my way.  Coding, deployment, testing, etc.  
- all are welcome as long as they are puzzling.


Thanks!

Chuck

P.S. Don't forget to register soon!


--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Help me choose topics for WOWODC'09

2009-04-17 Thread David Holt


On 17-Apr-09, at 10:43 AM, Chuck Hill wrote:



3. Leveraging EOF Validation and WO Components
- extending EOF's validation (GVC, Wonder, Validity approaches)
- dealing with an EOGeneralAdaptorException in a user friendly way
- getting pages and components to manage recording and displaying  
validation messages without you needing to get involved (aka  
WOComponent 2.0)





+1
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Help me choose topics for WOWODC'09

2009-04-17 Thread Miguel Arroz

Hi!

On 2009/04/17, at 18:43, Chuck Hill wrote:


2. EOF from Form Submission to Save Complete
A detailed look at what happens from when a form value comes in at  
takeValuesFromRequest, through validation, sending the SQL to the  
database, handling returned exceptions, and propagating change  
notifications.  This might be a really evil one to prepare for if I  
go into full detail.



  I vote for 2! ;)

  Yours

Miguel Arroz

...
http://www.survs.com



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: EOSQLQualifier replacement

2009-04-17 Thread Chuck Hill


On Apr 17, 2009, at 10:27 AM, Tom Pelaia wrote:


Hi,

We are using a CLOB to store some data and I need to search on it  
using the Oracle contains operation, but we also have several  
other fields which are used to qualify the search. I am already  
using EO Qualifiers to perform the search on the other parameters,  
but now I see that I need something like EOSQLQualifier to handle  
the CLOB. However, that class is deprecated, and the alternatives  
listed don't seem to be ideal since that would require me to rewrite  
the entire qualification using raw SQL. I would like to preserve the  
my current qualifier architecture.


Any suggestions?



The right way to do this would be to make a custom qualifier that  
generates the SQL needed. Wonder has some examples.  Writing them can  
be challenging due to the lack of documentation and examples with the  
why documented.  But then you can make qualifiers like:


EOQualifier qual = new OracleContainsQualifier(clobAttribute, some  
text);



Chuck



--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: EOSQLQualifier replacement

2009-04-17 Thread Tom Pelaia

Hi Chuck,

Thanks for the info. I will look into Wonder for an example. It seemed  
to me that an Oracle Plugin inner class was handling the SQL  
generation. As you mentioned, the documentation on how to create a  
EOQualifier subclass is weak.


thanks,
tom


On Apr 17, 2009, at 1:56 PM, Chuck Hill wrote:



On Apr 17, 2009, at 10:27 AM, Tom Pelaia wrote:


Hi,

We are using a CLOB to store some data and I need to search on it  
using the Oracle contains operation, but we also have several  
other fields which are used to qualify the search. I am already  
using EO Qualifiers to perform the search on the other parameters,  
but now I see that I need something like EOSQLQualifier to handle  
the CLOB. However, that class is deprecated, and the alternatives  
listed don't seem to be ideal since that would require me to  
rewrite the entire qualification using raw SQL. I would like to  
preserve the my current qualifier architecture.


Any suggestions?



The right way to do this would be to make a custom qualifier that  
generates the SQL needed. Wonder has some examples.  Writing them  
can be challenging due to the lack of documentation and examples  
with the why documented.  But then you can make qualifiers like:


EOQualifier qual = new OracleContainsQualifier(clobAttribute,  
some text);



Chuck



--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: [Wonder-disc] Batch deletions

2009-04-17 Thread Ricardo J. Parada
I did something like that once... Not sure I can share the code... I  
don't own it... :-(


But I implemented it as follows:

BatchEditor batchEditor = new BatchEditor(anEditingContext);

// modify your EOs here
...

/// then save your editing context
anEditingContext.saveChanges();



The BatchEditor function as a delegate of the EOAdaptorContext objects  
registered for the eomodels.  Then by combining adaptor operations for  
updates and deletes into a single operations.  For update operations  
as long as the entity and the changes are the same, the operations can  
be combined by ORing their qualifiers into a single operation.  For  
delete operations, as long as the entity is the same the operations  
can be combined by ORing their qualifiers together.


The BatchEditor is a one time use only.  It removes itself as a  
delegate once it accomplishes its function or once it's garbash  
collected.


The BatchEditor implements the delegate method:

public NSArray  
adaptorChannelWillPerformOperations(EOAdaptorChannel channel, NSArray  
operations) {


It then iterates over the EOAdaptorOperation objects in the operations  
NSArray.


For example for each operation.adaptorOperator() that is equal to  
EODatabaseOperation.AdaptorDeleteOperator I look at the  
operation.entity().  I keep a dictionary where the keys are entity  
names and the values are NSMutableArrays of these  
EOAdaptorOperations.  So for example, if two operations have the same  
entity they both end up in the same NSMutableArray in my dictionary,  
i.e. groups.objectForKey(Foo) returns an NSMutableArray with the two  
EOAdaptorOperation objects that have Foo as their entity.


Then you create a new array for the merged operations.  Let's say you  
have op1 and op2 which are delete operations for Foo.

You can :

	EOQualifier combinedQualifier = ERXQ.or(op1.qualifier(),  
op2.qualifier());

op1.setQualifier(combinedQualifier);

then you add op1 to the resulting operations array:

mergedOperations.addObject(op1);

then your adaptorChannelWillPerformOperations() returns an NSArray  
with the operations that you were not able to merge (combine).


Then EOF will perform those operations (the ones that you could not  
merge)... so what about the merged oeprations.  Well those are taken  
care of a bit later by the editor by implementing  
adaptorChannelDidPerformOperations() delegate method.  This gets  
called after the operations have been performed and in here we take  
care of performing the merged operations:


public Throwable  
adaptorChannelDidPerformOperations(EOAdaptorChannel sender, NSArray  
operations, Throwable exception) {


...

in here you do iterate over the merged operations array and do this:

sender.performAdaptorOperation(op);

you have to wrap this call to performAdaptorOperation() with a try- 
catch because EOF will throw an exception when it sees that more than  
one row was updated/deleted.  if that's the case you ignore the  
exception and continue with the next merged operation.  Other  
exceptions you do need to re throw them so they are handled at a  
higher level.


Anyways, that's the idea and it worked for us.

It would be nice if EOF did this for us, or had the option to turn it  
on/off.


I'm amazed by how the hooks into EOF allow you to extend it in ways  
like this.  This is one way I extended it to combine hundreds of  
deletes and updates to EOs into single update/delete statements.


It got complicated though when we ran into limits with ORACLE when  
combining a large number of qualifiers into a big OR qualifier.
So the code started relatively simple and then grew when we added  
handling for this situation.





On Apr 17, 2009, at 1:06 PM, Dan Grec wrote:


Hey all,

So we're still kicking this idea around, and my brain won't let it  
rest.


We're a little afraid of using the ERXEOAccessUtilities apprach as  
we really don't want to deal with the object graph being in a funny  
state.


So I've been wondering if we can influence the SQL that is  
generated  when EditingContext.saveChanges() is called.
At that point, all the notifications have been sent out and all of  
that stuff.
So when it creates the SQL for deletedObjects, instead of going over  
each EO one at a time and making delete from foo where id=bar
could it possibly check to see if there are many EOs of the same  
class and making a delete from foo where id in bar,bar2,bar3 type  
of dealy-o.
I also understand that it needs to visit each EO one at a time to  
call things like EO.willDelete() on them, I'm wondering if it could  
do all that, then make the one line of SQL and run it...

I'm going as deep as I can with Jad, but I'm way over my head.

It seems like a pretty nice optimization to me.

Is this possible or am I completely off base?

-Dan

On 16-Apr-09, at 12:08 PM, Chuck Hill wrote:



On Apr 16, 2009, at 6:30 AM, Vaughan Van Der Merwe wrote:


So if we happen to be using 

Re: Help me choose topics for WOWODC'09

2009-04-17 Thread Joe Little

#1 or #3, but the latter may be more inciteful

On Apr 17, 2009, at 10:43 AM, Chuck Hill ch...@global-village.net  
wrote:


I am considering a few topics (thinking to only do one) for  
WOWODC'09 in San Fran this June.  I'd appreciate some feedback on  
which ones are of the widest interest.



1. Testing
Someone else is going to be doing a session on testing covering TDD,  
Mocks, Example Objects, Acceptance/Integration/Unit tests, Demo of  
building an application with TDD.  Is there enough interest in a  
second session?  I'd plan to cover:


- using TestNG for unit testing (focus on the mechanics of using  
TestNG vs JUnit)


- functional testing with Selenium without using ERSelenium  
(focusing more
on the functional side than on the developer driven side, how to  
work with

the business folks to create functional and acceptance tests)

- writing and using extensions to SeleniumIDE and SeleniumCore

- generating and interpreting test coverage reports from EMMA

- using JMeter to load test WO apps




2. EOF from Form Submission to Save Complete
A detailed look at what happens from when a form value comes in at  
takeValuesFromRequest, through validation, sending the SQL to the  
database, handling returned exceptions, and propagating change  
notifications.  This might be a really evil one to prepare for if I  
go into full detail.




3. Leveraging EOF Validation and WO Components
- extending EOF's validation (GVC, Wonder, Validity approaches)
- dealing with an EOGeneralAdaptorException in a user friendly way
- getting pages and components to manage recording and displaying  
validation messages without you needing to get involved (aka  
WOComponent 2.0)



Other requests will be entertained.  :-)


Chuck


--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jmlittle 
%40gmail.com


This email sent to jmlit...@gmail.com

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Help me choose topics for WOWODC'09

2009-04-17 Thread Tim Kliewer

2  3 are pretty even in my world.

On Apr 17, 2009, at 10:43 AM, Chuck Hill wrote:


2. EOF from Form Submission to Save Complete
A detailed look at what happens from when a form value comes in at  
takeValuesFromRequest, through validation, sending the SQL to the  
database, handling returned exceptions, and propagating change  
notifications.  This might be a really evil one to prepare for if I  
go into full detail.


3. Leveraging EOF Validation and WO Components
- extending EOF's validation (GVC, Wonder, Validity approaches)
- dealing with an EOGeneralAdaptorException in a user friendly way
- getting pages and components to manage recording and displaying  
validation messages without you needing to get involved (aka  
WOComponent 2.0)



Tim Kliewer
WWBI Software Engineering
 Apple, Sacramento Operations
MS: 204-50  Tel: (916) 399-5101
2911 Laguna Blvd Cell: (916) 717-8748
Elk Grove, CA 95758 E-mail: tklie...@apple.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: EOSQLQualifier replacement

2009-04-17 Thread Bill Gallop

Hi Tom,

As it turns out I did something very similar to this yesterday to  
create a soundex qualifier.  In my case, I used the Wonder qualifiers  
as a guide on how to do it as, like you, I didn't find much in the way  
of documentation by Apple.


The first thing you'll want to do is subclass ERXKeyValueQualifier  
(Wonder) or EOKeyValueQualifier (non-Wonder) as you'll want to see if  
this key contains that string.


You'll want to override the 'evaluatesWithObject' method, which  
essentially returns true if a certain object qualifies against this  
qualifier.  Since you'll want the key's value on the object, use  
something like this:


public boolean evaluateWithObject(Object object) {
	Object result =  
NSKeyValueCodingAdditions.Utility.valueForKeyPath(object, key());

if (result == null)
return false;
return value().toString().contains(result.toString());
}

checking for null values where appropriate, of course.

You can test this out now in unit tests / elsewhere in the application  
that uses in-memory filtering and it'll do exactly as you'd expect.   
The problem is when you try to use your qualifier in a fetch  
specification - when it actually hits the database - you'll get  
nothing back because EOF isn't sure how to express your query in SQL,  
so you have to tell it how.


So, you'll want to create a subclass of  
EOQualifierSQLGeneration._KeyValueQualifierSupport and override this  
method:


public String sqlStringForSQLExpression(EOQualifier rawQualifier,  
EOSQLExpression sqlExpression)


rawQualifier is your contains qualifier, so feel free to cast it to  
that if you need it (you'll need the key() and value() methods!) and  
sqlExpression contains some goodies that you'll need a bit later.


What you want this method to return is a qualifying string in SQL -  
that is, if your SELECT statement looks like this:


select FIRST_NAME, LAST_NAME from PERSON where PERSON_ID = 1 and AGE  
= 19


you're looking to return the PERSON_ID = 1 or AGE = 19 bits.  At this  
point, EOF has already been awesome and figured out what the table/ 
field name bit of this is - it'll look like t0.PERSON_ID or  
t1.LOCATION_ID or something, so you can get this like this:


NSArray? attributePath =  
ERXEOAccessUtilities.attributePathForKeyPath(e.entity(),  
yourQualifier.key());

EOAttribute attribute = (EOAttribute) attributePath.lastObject();
String sqlName;
if (attributePath.count()  1)
sqlName = e.sqlStringForAttributePath(attributePath);
else
sqlName = e.sqlStringForAttribute(attribute);

I stole this from Wonder, and I'm not sure if there's a shorter way to  
do it, but now you have sqlName and, by using yourQualifier.value(),  
you should be able to make your qualifying string without too much  
difficulty.  I'm not sure how to do this *without*  
ERXEOAccessUtilities.  Be careful at this level, though, because you  
could be vulnerable to SQL injection.


The final little bit you want to do is tell EOF to use your special  
SQL generator when using this qualifier.  At the top of your  
qualifier, add this lovely little bit of code:


static {
	EOQualifierSQLGeneration.Support.setSupportForClass(new  
YourQualifierSQLGenerationSupport(), YourQualifier.class);

}

Hope this helps.

Bill


Hi Chuck,


Thanks for the info. I will look into Wonder for an example. It  
seemed to me that an Oracle Plugin inner class was handling the SQL  
generation. As you mentioned, the documentation on how to create a  
EOQualifier subclass is weak.


thanks,
tom


--
Bill Gallop
Software Developer
Strata Health Solutions Inc.
Phone: +1 403 261 0855 x2103
Fax: +1 403 265 0650
http://www.stratahealth.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: JavaClient: does the eomodel file need to be included with the client app?

2009-04-17 Thread Stamenkovic Florijan

Just on the server.

On Apr 17, 2009, at 12:33, John Huss wrote:

In JavaClient does the eomodel file need to be included with the  
client app?  Or just on the server as usual?


John


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: JavaClient: does the eomodel file need to be included with the client app?

2009-04-17 Thread David Avendasora
Just on the server for a normal JC app. The client (like a _good_  
client) knows nothing about the M portion MVC.


Now, if you're going to do crazy client-side persistence stuff, you'll  
be figuring it out on your own! :-)


Dave


On Apr 17, 2009, at 12:33 PM, John Huss wrote:

In JavaClient does the eomodel file need to be included with the  
client app?  Or just on the server as usual?


John
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


WO development on Windows with Eclipse/WOLips

2009-04-17 Thread David Ress

All,

WebObjects is definitely an awesome tool. I can say that as for the  
past four years I have been using WO, my WO efforts and the results  
the apps generate have caught the attention of a much larger company  
under whom I am now employed.


My question centers around the fact I am required to embrace a  
government standard of Windows + SQL Server for the WO applications  
for both deployment and development.  Deployment comes later, and  
with the recent activity on the list I believe I will be ok using  
Tomcat.


But, development has me concerned, and I welcome any advice/guidance  
in spec-ing a Windows system with Eclipse/WOLips for development in  
terms of:


XP vs Vista - which one is best with Eclipse/WOLips?  Any 64bit  
issues with Vista and Eclipse/WOLips?


RAM - I know more is always better but XP has a theoretical limit  
of 4GB, and I am coming from a Mac Pro with 6GB.


So, for those of you currently developing on the other platform, can  
you offer any guidance or advice?


Thanks in advance,
David
---
David Ress, PhDCEO - Chief Entertainment Officer
ISTL, Inc.   Beavercreek Ohio, 45434
www.infoscribe.com   Phone: (937) 431-8870


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Help me choose topics for WOWODC'09

2009-04-17 Thread Cail Borrell

+1

On 17/04/2009, at 19.47, David Holt wrote:



On 17-Apr-09, at 10:43 AM, Chuck Hill wrote:



3. Leveraging EOF Validation and WO Components
- extending EOF's validation (GVC, Wonder, Validity approaches)
- dealing with an EOGeneralAdaptorException in a user friendly way
- getting pages and components to manage recording and displaying  
validation messages without you needing to get involved (aka  
WOComponent 2.0)





+1
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/cail%40frontbase.com

This email sent to c...@frontbase.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: WO development on Windows with Eclipse/WOLips

2009-04-17 Thread Chuck Hill


On Apr 17, 2009, at 1:53 PM, David Ress wrote:


All,

WebObjects is definitely an awesome tool. I can say that as for the  
past four years I have been using WO, my WO efforts and the results  
the apps generate have caught the attention of a much larger company  
under whom I am now employed.


My question centers around the fact I am required to embrace a  
government standard of Windows + SQL Server for the WO applications  
for both deployment and development.  Deployment comes later, and  
with the recent activity on the list I believe I will be ok using  
Tomcat.


Ick! is my first thought.  You will probably want my SQL Server plugin:

http://www.gvcsitemaker.com/chill/ms_sql_server_eof_plugin

You will probably spend some time working around SQL Server features /  
limitations.



But, development has me concerned, and I welcome any advice/guidance  
in spec-ing a Windows system with Eclipse/WOLips for development in  
terms of:


XP vs Vista - which one is best with Eclipse/WOLips?  Any 64bit  
issues with Vista and Eclipse/WOLips?


RAM - I know more is always better but XP has a theoretical limit  
of 4GB, and I am coming from a Mac Pro with 6GB.


I develop with 4GB on OS X.


Chuck





So, for those of you currently developing on the other platform, can  
you offer any guidance or advice?


Thanks in advance,
David
---
David Ress, PhDCEO - Chief Entertainment  
Officer
ISTL, Inc.   Beavercreek Ohio,  
45434

www.infoscribe.com   Phone: (937) 431-8870


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net



--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: WO development on Windows with Eclipse/WOLips

2009-04-17 Thread Guido Neitzer

On Apr 17, 2009, at 2:03 PM, Chuck Hill wrote:

My question centers around the fact I am required to embrace a  
government standard of Windows + SQL Server for the WO applications  
for both deployment and development.  Deployment comes later, and  
with the recent activity on the list I believe I will be ok using  
Tomcat.


Ick! is my first thought.  You will probably want my SQL Server  
plugin:


Same reaction here ... government standard seems to always be get the  
worst you can get and be done with it.


RAM - I know more is always better but XP has a theoretical limit  
of 4GB, and I am coming from a Mac Pro with 6GB.


I develop with 4GB on OS X.


At the moment I'm developing with 2GB and OS X. Database running on  
the same box ...


cug
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: modeling problem

2009-04-17 Thread Fredrik Lindgren
I would love to see the model. I am having trouble creating posixGroup  
records. Perhaps because of the objectClass multi-value type?


My goal is to create users with email accounts on a mac os x server.

Regards
/Fredrik

2 apr 2009 kl. 02.20 skrev Mike Schrag:

I can send you an EOModel that defines inetOrgPerson and posixGroup  
if you want ... mapping onto LDAP is kind of weird because it  
supports multivalues, which makes the EOs kind of weird, but we use  
it extensively for user/group syncing and it works well.


On Apr 1, 2009, at 7:51 PM, Daniel Beatty wrote:


Greetings Tim,
So far it seems you and I are hitting the same problem.   There is  
one additional question regarding the modeling of InetOrgPerson as  
defined in the OD scheme.   How does it reference the User with  
groups defined on the OD?   For annoying things like authorizing a  
person to use a resource, it would be nice to let OD do its thing  
to determine group membership.


I would certainly appreciate some insight.   Also, it was nice to  
notice that the InetOrgPerson includes references to User  
Certificates, which is more useful in determining membership to a  
particular federation.


Later,
Dan Beatty, M.S. CS (B.S. EECS)
Ph.D. Student
Texas Tech University
dan.bea...@mac.com
http://venus.cs.ttu.edu/~dabeatty


On Mar 31, 2009, at 4:33 PM, TW wrote:


On Mar 31, 2009, at 10:06 AM, Chuck Hill wrote:



On Mar 30, 2009, at 4:29 PM, TW wrote:


My goal was to have an entity/class (where InetOrgPerson is  
super) in a middle framework that can be used to wrap a  
relationship between ldap user and database employee (each  
modeled in their own frameworks). So, the way I have it set  
up there's really no difference between InetOrgPerson and  
GenericUser except that GenericUser has the relationship to  
database employee and InetOrgPerson does not.


I still wonder if GenericUser should have a relationship to  
both InetOrgPerson and DatabaseEmployee.


With that approach, it sounds like GenericUser would have to  
have it's own data table separate from the other two?


Doesn't it need to anyway for the relationship to  
DatabaseEmployee?


Not really. Time for ascii sheep. This is what I have.

LDAPModel		---to build path--		UserModel		--to build path	 
DBModel

=   

InetOrgPerson   GenericUser   
  -   Employee

(InetOrgPerson/parent)



The only relationship (on the right) uses employee_id.


That is in the LDAP information?


Yes, InetOrgPerson has employeeNumber. We use FileMaker-based  
tools I created for adding accounts to OD. They call DSImport to  
add records to OD as needed and they're set up to push the  
employee_id into that attribute.


Actually, there's a scenario right there that supports your  
suggestion to have an intermediary GenericUser table since that is  
essentially the same position the old FileMaker database holds -  
collection of everyone.


This approach makes the ldap side of things the starting point  
since that is the store that knows what type of user the person  
is. If ldap authentication is successful, I query for the  
matching GenericUser which is essentially an ldap person since  
GenericUser inherits from InetOrgPerson.


That sounds like a correct use of inheritance.  I think you are  
going to need a restricting qualifier on InetOrgPerson that is  
always false.


I tried the (1=0) restricting qualifier and EOGenerator did not  
like it and coughed up an error about being unable to parse the  
qualifier. Good thought though.


Well, I've got a version in my repository the way it is. I'm  
trying to model it the other way around now and we'll see how that  
works.


Then, I can test for the related employee record. If there, foo,  
if not, bar - depends on the app.


It sounds like your preferred approach would be to create  
another table for GenericUser making it a database entity  
instead of inheriting from InetOrgPerson. That could work too.  
The problem there is then I have two entities, InetOrgPerson and  
GenericUser that have to have similar attributes, including  
usertype, email, etc.  And, when a new Employee is created,  
I'd have to force the creation of a GenericUser.


It sounds like you are on the right track.  I think.

I can see advantages each way and it's too bad I'm somewhat at  
the mercy of the greater campus.


Hence the lure of herding goats and sheep, living on wine and  
cheese.



Chuck

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your