Remove ajax functionality from Appfuse

27 messages Options
Embed this post
Permalink
1 2
Matt Raible-3

Re: Re: Remove ajax functionality from Appfuse

Reply Threaded More More options
Print post
Permalink
I guess JSF is pretty slow then. ;-)  This problem doesn't happen on
my Mac, Windows or Linux machines, so I still suspect an environment
issue.  Can you try it on a different machine, or try it with your
network connection disabled?  It may be trying to resolve a DTD on the
internet or something like that.

As far as Ajax4JSF, I entered an issue to change to it's (much faster)
FastFilter.

http://issues.appfuse.org/browse/APF-531

Matt

On 11/21/06, John Allerdyce <[hidden email]> wrote:

> Sorry, I was wrong.  switching to use the facelet viewhandler (instead of
> ajax4jsf) has no effect on the first page load time. It is still about 20
> seconds... (same as before).
>
>
> On 11/21/06, John Allerdyce <[hidden email]> wrote:
> > Thanks for the help. After switching to use the facelet viewhandler
> (instead of ajax4jsf), the
> > first page load time (of main-menu) cut down to 6 seconds from 20 seconds!
> >
> >
> >
> >
> > On 11/21/06, Matt Raible <[hidden email]> wrote:
> > > You'll need to remove the Ajax4jsf parameters in web.xml, as well as
> > > set the view handler to facelets in faces-config.xml.
> > >
> > >
> https://facelets.dev.java.net/nonav/docs/dev/docbook.html#gettingstarted-setup-faces
> > >
> > > Matt
> > >
> > > On 11/21/06, John Allerdyce < [hidden email]> wrote:
> > > > Hi,
> > > >
> > > > I have removed the ajax4jsf filter in web.xml. but in the stack trace,
> i
> > > > still see ajax4jsf class.
> > > > Can you please tell me what am i missing?
> > > > org.ajax4jsf.framework.ViewHandlerWrapper.renderView
> > > > (ViewHandlerWrapper.java:101)
> > > >
> > > > Full trace:
> > > >  at
> > > >
> com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:235)
> > > >  at
> > > >
> com.sun.facelets.tag.TagAttribute.getBoolean(TagAttribute.java
> :79)
> > > >  at com.sun.facelets.tag.jstl.core.IfHandler.apply
> > > > (IfHandler.java:49)
> > > >  at
> > > >
> com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
> > > >  at
> > > >
> com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler
> (ComponentHandler.java:295)
> > > >  at com.sun.facelets.tag.jsf.ComponentHandler.apply
> > > > (ComponentHandler.java:165)
> > > >  at
> > > >
> com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java
> :47)
> > > >  at
> > > >
> com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
> > > >  at
> com.sun.facelets.tag.CompositeFaceletHandler.apply
> > > > (CompositeFaceletHandler.java:47)
> > > >  at
> > > > com.sun.facelets.compiler.NamespaceHandler.apply
> (NamespaceHandler.java:49)
> > > >  at
> > > >
> com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
> > > >  at com.sun.facelets.impl.DefaultFacelet.apply
> > > > (DefaultFacelet.java:95)
> > > >  at
> > > >
> com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:510)
> > > >  at
> > > >
> com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
> > > >  at
> org.ajax4jsf.framework.ViewHandlerWrapper.renderView
> > > > (ViewHandlerWrapper.java:101)
> > > >  at
> > > >
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
> > > >  at
> > > >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
> > > >
> > > >
> > > >  On 11/21/06, Rafael Nami <[hidden email]> wrote:
> > > > >
> > > > > This is very strange, because usually (and well applied), Ajax can
> be
> > > > something to add performance to your application, since the UI is
> partially
> > > > processed/refreshed/updated, making your webapp much more responsive
> than a
> > > > standard webapp.
> > > > >
> > > > > best all
> > > > >
> > > > > Rafael Mauricio Nami
> > > > >
> > > > > 2006/11/21, Matt Raible < [hidden email]>:
> > > > >
> > > > > > Do the tests run fast?  If so, then it's likely a browser or
> network
> > > > > > issue.  If you're not running JDK 5, you might try that.  AppFuse
> > > > > > generally runs very fast after you pre-compile the JSPs (which is
> an
> > > > > > option at build time).  For that reason, I suspect it may be an
> > > > > > environment issue.
> > > > > >
> > > > > > Matt
> > > > > >
> > > > > > On 11/21/06, John Allerdyce < [hidden email] > wrote:
> > > > > > > Thanks for the idea.
> > > > > > >
> > > > > > > Users find it slow even when he access the 'barebone'
> functionality of
> > > > > > > Appfuse (e.g. mainMenu, login screen).  I don' t have any more
> menu
> > > > item
> > > > > > > then the original AppFuse.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >  On 11/21/06, Matt Raible < [hidden email] > wrote:
> > > > > > > > You might try bumping up your memory settings.  Here's what
> the
> > > > > > > > CATALINA_OPTS environment variable on demo.appfuse.org is set
> to.
> > > > > > > >
> > > > > > > > -server -Xms256M -Xmx384M -XX:MaxPermSize=256m
> > > > > > > >
> > > > > > > > If that doesn't work, I'd suggest downloading a tool like
> JProfiler
> > > > > > > > and trying to identify where the bottleneck is.  You might
> also try
> > > > > > > > installing a bare-bones version of AppFuse and see if the
> behavior
> > > > > > > > happens in that application.
> > > > > > > >
> > > > > > > > Matt
> > > > > > > >
> > > > > > > > On 11/21/06, John Allerdyce < [hidden email]> wrote:
> > > > > > > > > The demo at
> http://demo.appfuse.org/demos.html
> > > > is
> > > > > > > quick!
> > > > > > > > >
> > > > > > > > > But when i first start and hit ' mainMenu.html' of appfuse,
> it
> > > > takes up
> > > > > > > to 20
> > > > > > > > > seconds for a page to show. And tomcat itself takes up to 45
> > > > seconds to
> > > > > > > > > finish init (if i install my test app).
> > > > > > > > >
> > > > > > > > > I am running both tomcat/databasever and my browser on the
> same
> > > > machine,
> > > > > > > so
> > > > > > > > > that should be no network delay.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 11/21/06, Matt Raible < [hidden email] > wrote:
> > > > > > > > > > What part of it is slow? You might configure EhCache to be
> a
> > > > more
> > > > > > > > > > aggressive 2nd level cache for Hibernate.  Are the demos
> at
> > > > > > > > > > http://demo.appfuse.org/demos.html slow
> for
> > > > your
> > > > > > > users as
> > > > > > > > > well?
> > > > > > > > > >
> > > > > > > > > > Matt
> > > > > > > > > >
> > > > > > > > > > On 11/21/06, John Allerdyce < [hidden email] >
> wrote:
> > > > > > > > > > > Thanks for all the feedback.
> > > > > > > > > > >
> > > > > > > > > > > The feedback I got from a webapp I built based on
> AppFuse is
> > > > it is
> > > > > > > slow.
> > > > > > > > > > > i am trying to make it faster by taking unnecessary
> filters (
> > > > e.g.
> > > > > > > ajax,
> > > > > > > > > > > clickstream).
> > > > > > > > > > >
> > > > > > > > > > > if you have other ideas, can you please let me know.
> > > > > > > > > > >
> > > > > > > > > > > Thank you.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On 11/21/06, Matt Raible < [hidden email] > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > In reality, there are no "Ajax" features in AppFuse.
> > > > There's
> > > > > > > merely
> > > > > > > > > > > > Script.aculo.us and DWR to allow you to build
> Ajax-ified
> > > > > > > applications.
> > > > > > > > > > > > There's really no need to remove anything.  Is this a
> > > > management
> > > > > > > > > > > > decision that requires you to remove Ajax stuff?
> What's
> > > > their
> > > > > > > > > > > > reasoning?
> > > > > > > > > > > >
> > > > > > > > > > > > Matt
> > > > > > > > > > > >
> > > > > > > > > > > > On 11/21/06, Smiley, Stuart A. <
> [hidden email]>
> > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > I think these three js libraries are here because
> they are
> > > > > > > generally
> > > > > > > > > > > useful,
> > > > > > > > > > > > > not because they are absolutely necessary to use
> ajax.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Stuart
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > From:
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> [hidden email]
> > > > > > > > > > > > > [mailto:
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> [hidden email]
> > > > > > > ]On
> > > > > > > > > > > > > Behalf Of John Allerdyce
> > > > > > > > > > > > > Sent: Tuesday, November 21, 2006 2:23 PM
> > > > > > > > > > > > > To: [hidden email]
> > > > > > > > > > > > > Subject: Re: [appfuse-user] Re: Remove ajax
> functionality
> > > > from
> > > > > > > > > Appfuse
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks.
> > > > > > > > > > > > >
> > > > > > > > > > > > > From DWR documentation, it said they use these
> libraries:
> > > > > > > > > > > > >
> http://getahead.ltd.uk/dwr/documentation
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > engine.js: Handles all server communication
> > > > > > > > > > > > > util.js: Helps you alter web pages with the data you
> got
> > > > from
> > > > > > > the
> > > > > > > > > server
> > > > > > > > > > > > > (and a few neat extras too)But in   default.jsp, I
> found
> > > > these:
> > > > > > > > > > > > >
> > > > > > > > > > > > >   <script type="text/javascript" src="<c:url
> > > > > > > > > > > > >
> > > > value='/scripts/prototype.js'/>"></script>
> > > > > > > > > > > > >         <script type="text/javascript" src="<c:url
> > > > > > > > > > > > >
> > > > value='/scripts/scriptaculous.js'/>"></script>
> > > > > > > > > > > > >         <script type="text/javascript" src="<c:url
> > > > > > > > > > > > >
> value='/scripts/global.js'/>"></script>
> > > > > > > > > > > > >
> > > > > > > > > > > > > So which of them are for AJAX?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > On 11/21/06, Rafael Nami < [hidden email] >
> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > You just have to comment/remove the DWR servlet
> > > > declaration,
> > > > > > > and
> > > > > > > > > do
> > > > > > > > > > > the
> > > > > > > > > > > > > same with the js declaration in your jsps.
> > > > > > > > > > > > > > So, in pieces:
> > > > > > > > > > > > > > <!--servlet-mapping>
> > > > > > > > > > > > > >
> > > > > > > <servlet-name>dwr-invoker</servlet-name>
> > > > > > > > > > > > > >
> > > > <url-pattern>/dwr/*</url-pattern>
> > > > > > > > > > > > > >     </servlet-mapping>
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >  <servlet>
> > > > > > > > > > > > > >
> > > > > > > <servlet-name>dwr-invoker</servlet-name>
> > > > > > > > > > > > > >         <servlet-class>
> > > > > > > > > uk.ltd.getahead.dwr.DWRServlet</servlet-class>
> > > > > > > > > > > > > >         <init-param>
> > > > > > > > > > > > > >             <param-name>debug</param-name>
> > > > > > > > > > > > > >             <param-value>true</param-value>
> > > > > > > > > > > > > >         </init-param>
> > > > > > > > > > > > > >     </servlet>
> > > > > > > > > > > > > > <filter-mapping>
> > > > > > > > > > > > > >
> > > > <filter-name>ajax4jsf</filter-name>
> > > > > > > > > > > > > >
> > > > <servlet-name>faces</servlet-name>
> > > > > > > > > > > > > >
> > > > <!--dispatcher>REQUEST</dispatcher>
> > > > > > > > > > > > > >
> > > > <dispatcher>FORWARD</dispatcher-->
> > > > > > > > > > > > > >     </filter-mapping>
> > > > > > > > > > > > > >  <filter-mapping>
> > > > > > > > > > > > > >
> > > > > > > <filter-name>encodingFilter</filter-name>
> > > > > > > > > > > > > >
> > > > <url-pattern>/dwr/*</url-pattern>
> > > > > > > > > > > > > >     </filter-mapping>
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >     <filter>
> > > > > > > > > > > > > >
> > > > <filter-name>ajax4jsf</filter-name>
> > > > > > > > > > > > > >         <filter-class>
> > > > org.ajax4jsf.Filter</filter-class>
> > > > > > > > > > > > > >     </filter-->
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > and remove the DWR javascript declarations in your
> JSPs
> > > > > > > (probably
> > > > > > > > > > > they're
> > > > > > > > > > > > > in your default.jsp).
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > All the best
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Rafael Mauricio Nami
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > 2006/11/21, John Allerdyce <
> [hidden email]>:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I think I am able to take away the Ajax
> functionality
> > > > by
> > > > > > > doing
> > > > > > > > > what
> > > > > > > > > > > I
> > > > > > > > > > > > > said in my previous mail.
> > > > > > > > > > > > > > > I would like to know if which of these
> JavaScript is
> > > > for
> > > > > > > Ajax? I
> > > > > > > > > > > think
> > > > > > > > > > > > > the first 2 are for Ajax, I am just not sure about
> the
> > > > last one.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >         <script type="text/javascript"
> src="<c:url
> > > > > > > > > > > > >
> > > > value='/scripts/prototype.js'/>"></script>
> > > > > > > > > > > > > > >         <script type="text/javascript"
> src="<c:url
> > > > > > > > > > > > >
> > > > value='/scripts/scriptaculous.js'/>"></script>
> > > > > > > > > > > > > > >         <script type="text/javascript"
> src="<c:url
> > > > > > > > > > > > >
> value='/scripts/global.js'/>"></script>
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > On 11/21/06, John Allerdyce <
> [hidden email]
> > > > >
> > > > > > > wrote:
> > > > > > > > > > > > > > > > Hi,
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > I am trying to remove ajax functionality from
> > > > Appfuse:
> > > > > > > > > > > > > > > > From what i see, I can remove these.  Is that
> > > > accurate? Is
> > > > > > > > > there
> > > > > > > > > > > > > anything else I should remove if I want to take
> disable
> > > > ajax
> > > > > > > > > > > functionality
> > > > > > > > > > > > > in Appfuse?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >  <servlet-mapping>
> > > > > > > > > > > > > > > >
> > > > > > > > > <servlet-name>dwr-invoker</servlet-name>
> > > > > > > > > > > > > > > >
> > > > <url-pattern>/dwr/*</url-pattern>
> > > > > > > > > > > > > > > >     </servlet-mapping>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >  <servlet>
> > > > > > > > > > > > > > > >
> > > > > > > > > <servlet-name>dwr-invoker</servlet-name>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > <servlet-class> uk.ltd.getahead.dwr.DWRServlet
> </servlet-class>
> > > > > > > > > > > > > > > >         <init-param>
> > > > > > > > > > > > > > > >             <param-name>debug</param-name>
> > > > > > > > > > > > > > > >             <param-value>true</param-value>
> > > > > > > > > > > > > > > >         </init-param>
> > > > > > > > > > > > > > > >     </servlet>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >  <listener>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> <listener-class>com.opensymphony.clickstream.ClickstreamListener</listener-class>
> > > > > > > > > > > > > > > >     </listener>
> > > > > > > > > > > > > > > >   <listener>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> <listener-class>com.testapp.listener.UserCounterListener
> > > > > > > </listener-class>
> > > > > > > > > > > > > > > >     </listener>
> > > > > > > > > > > > > > > > <filter-mapping>
> > > > > > > > > > > > > > > >
> > > > > > > > > > >
> <filter-name>clickstreamFilter</filter-name>
> > > > > > > > > > > > > > > >
> > > > <url-pattern>*.html</url-pattern>
> > > > > > > > > > > > > > > >     </filter-mapping>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >  <filter-mapping>
> > > > > > > > > > > > > > > >
> > > > > > > <filter-name>ajax4jsf</filter-name>
> > > > > > > > > > > > > > > >
> > > > > > > <servlet-name>faces</servlet-name>
> > > > > > > > > > > > > > > >
> > > > > > > <!--dispatcher>REQUEST</dispatcher>
> > > > > > > > > > > > > > > >
> > > > > > > <dispatcher>FORWARD</dispatcher-->
> > > > > > > > > > > > > > > >     </filter-mapping>
> > > > > > > > > > > > > > > >  <filter-mapping>
> > > > > > > > > > > > > > > >
> > > > > > > > > <filter-name>encodingFilter</filter-name>
> > > > > > > > > > > > > > > >
> > > > <url-pattern>/dwr/*</url-pattern>
> > > > > > > > > > > > > > > >     </filter-mapping>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >     <filter>
> > > > > > > > > > > > > > > >
> > > > > > > <filter-name>ajax4jsf</filter-name>
> > > > > > > > > > > > > > > >         <filter-class>
> > > > org.ajax4jsf.Filter</filter-class>
> > > > > > > > > > > > > > > >     </filter>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >     <filter>
> > > > > > > > > > > > > > > >
> > > > > > > > > <filter-name>cacheFilter</filter-name>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > > <filter-class>
> > > > com.opensymphony.oscache.web.filter.CacheFilter
> </filter-class>
> > > > > > > > > > > > > > > >     </filter>
> > > > > > > > > > > > > > > >     <filter>
> > > > > > > > > > > > > > > >
> > > > > > > > > > >
> <filter-name>clickstreamFilter</filter-name>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > <filter-class>
> > > > > > >
> > > >
> com.opensymphony.clickstream.ClickstreamFilter</filter-class>
> > > > > > > > > > > > > > > >     </filter>
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > http://raibledesigns.com
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > > [hidden email]
> > > > > > > > > > > > For additional commands, e-mail:
> > > > [hidden email]
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > http://raibledesigns.com
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > [hidden email]
> > > > > > > > > > For additional commands, e-mail:
> [hidden email]
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > http://raibledesigns.com
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > > > > > [hidden email]
> > > > > > > > For additional commands, e-mail:
> [hidden email]
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > http://raibledesigns.com
> > > > > >
> > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > [hidden email]
> > > > > > For additional commands, e-mail: [hidden email]
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > http://raibledesigns.com
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
> >
>
>


--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Joao Nelas-2

Re: How to use hibernate to delete multiple records in Appfuse?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Pankaj
You could use :

getHibernateTemplate().bulkUpdate("delete book FROM org.mycompany.Book as
book where type = 'technical' ");

João Nelas

On 11/21/06, pankaj singla <[hidden email]> wrote:
Hi,

       I am using appfuse 1.7 in one of my
applications. I want to delete multiple records from
one of my tables. One way to do is to get a collection
of records to be deleted in action and call delete on
individual object.
       What is a food way to delete them together? One
method is:
HibernateTemplate.deleteAll(Collection);

but then I have to first get a collection. I was
thinking more in terms of this:

Session sess = HibernateFactory.currentSession();
sess.delete("select book FROM org.mycompany.Book as
book where type = 'technical'");

   Is it safe to use this kind of query in Appfuse.

Thanks,

Pankaj



____________________________________________________________________________________
Sponsored Link

$200,000 mortgage for $660/ mo -
30/15 yr fixed, reduce debt -
http://yahoo.ratemarketplace.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Pankaj

Re: How to use hibernate to delete multiple records in Appfuse?

Reply Threaded More More options
Print post
Permalink
Hi Joao,

          Thanks for the reply. But I didn't find any
bulkUpdate() method into the Spring HibernateTemplate
API. Is there something I am missing.....



--- Joao Nelas <[hidden email]> wrote:

> You could use :
>
> getHibernateTemplate().bulkUpdate("delete book FROM
> org.mycompany.Book as
> book where type = 'technical' ");
>
> João Nelas
>
> On 11/21/06, pankaj singla <[hidden email]>
> wrote:
> >
> > Hi,
> >
> >        I am using appfuse 1.7 in one of my
> > applications. I want to delete multiple records
> from
> > one of my tables. One way to do is to get a
> collection
> > of records to be deleted in action and call delete
> on
> > individual object.
> >        What is a food way to delete them together?
> One
> > method is:
> > HibernateTemplate.deleteAll(Collection);
> >
> > but then I have to first get a collection. I was
> > thinking more in terms of this:
> >
> > Session sess = HibernateFactory.currentSession();
> > sess.delete("select book FROM org.mycompany.Book
> as
> > book where type = 'technical'");
> >
> >    Is it safe to use this kind of query in
> Appfuse.
> >
> > Thanks,
> >
> > Pankaj
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sponsored Link
> >
> > $200,000 mortgage for $660/ mo -
> > 30/15 yr fixed, reduce debt -
> > http://yahoo.ratemarketplace.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [hidden email]
> > For additional commands, e-mail:
> [hidden email]
> >
> >
>



 
____________________________________________________________________________________
Sponsored Link

Compare mortgage rates for today.
Get up to 5 free quotes. www2.nextag.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Smiley, Stuart A.

RE: How to use hibernate to delete multiple records in Appfuse?

Reply Threaded More More options
Print post
Permalink
Are you looking at org.springframework.orm.hibernate.HibernateTemplate.  The method is in org.springframework.orm.hibernate3.HibernateTemplate.

Stuart

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]
]On Behalf Of pankaj singla
Sent: Wednesday, November 22, 2006 11:38 AM
To: [hidden email]
Subject: Re: [appfuse-user] How to use hibernate to delete multiple
records in Appfuse?


Hi Joao,

          Thanks for the reply. But I didn't find any
bulkUpdate() method into the Spring HibernateTemplate
API. Is there something I am missing.....



--- Joao Nelas <[hidden email]> wrote:

> You could use :
>
> getHibernateTemplate().bulkUpdate("delete book FROM
> org.mycompany.Book as
> book where type = 'technical' ");
>
> João Nelas
>
> On 11/21/06, pankaj singla <[hidden email]>
> wrote:
> >
> > Hi,
> >
> >        I am using appfuse 1.7 in one of my
> > applications. I want to delete multiple records
> from
> > one of my tables. One way to do is to get a
> collection
> > of records to be deleted in action and call delete
> on
> > individual object.
> >        What is a food way to delete them together?
> One
> > method is:
> > HibernateTemplate.deleteAll(Collection);
> >
> > but then I have to first get a collection. I was
> > thinking more in terms of this:
> >
> > Session sess = HibernateFactory.currentSession();
> > sess.delete("select book FROM org.mycompany.Book
> as
> > book where type = 'technical'");
> >
> >    Is it safe to use this kind of query in
> Appfuse.
> >
> > Thanks,
> >
> > Pankaj
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sponsored Link
> >
> > $200,000 mortgage for $660/ mo -
> > 30/15 yr fixed, reduce debt -
> > http://yahoo.ratemarketplace.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [hidden email]
> > For additional commands, e-mail:
> [hidden email]
> >
> >
>



 
____________________________________________________________________________________
Sponsored Link

Compare mortgage rates for today.
Get up to 5 free quotes. www2.nextag.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Mike Horwitz

Re: How to use hibernate to delete multiple records in Appfuse?

Reply Threaded More More options
Print post
Permalink
Hi Pankaj,
 
If you are using AppFuse 1.7 it may be that the version of Hibernate + Spring is too old to contain the required functionality. Bulk operation statements are fairly new in Hibernate. Have you considered upgrading to a newer version of AppFuse?
 
If not you should be able to obtain a database connection from the Hibernate session and use the Spring JDBC utilities to perform the bulk update operations.
 
Regards
 
Mike Horwitz

 
On 11/22/06, Smiley, Stuart A. <[hidden email]> wrote:
Are you looking at org.springframework.orm.hibernate.HibernateTemplate.  The method is in org.springframework.orm.hibernate3.HibernateTemplate .

Stuart

-----Original Message-----
From: [hidden email]
[mailto: [hidden email]
]On Behalf Of pankaj singla
Sent: Wednesday, November 22, 2006 11:38 AM
To: [hidden email]
Subject: Re: [appfuse-user] How to use hibernate to delete multiple
records in Appfuse?


Hi Joao,

         Thanks for the reply. But I didn't find any
bulkUpdate() method into the Spring HibernateTemplate
API. Is there something I am missing.....



--- Joao Nelas <[hidden email]> wrote:

> You could use :
>
> getHibernateTemplate().bulkUpdate("delete book FROM
> org.mycompany.Book as
> book where type = 'technical' ");
>
> João Nelas
>
> On 11/21/06, pankaj singla < [hidden email]>
> wrote:
> >
> > Hi,
> >
> >        I am using appfuse 1.7 in one of my
> > applications. I want to delete multiple records
> from
> > one of my tables. One way to do is to get a
> collection
> > of records to be deleted in action and call delete
> on
> > individual object.
> >        What is a food way to delete them together?
> One
> > method is:
> > HibernateTemplate.deleteAll(Collection);
> >
> > but then I have to first get a collection. I was
> > thinking more in terms of this:
> >
> > Session sess = HibernateFactory.currentSession();
> > sess.delete("select book FROM org.mycompany.Book
> as
> > book where type = 'technical'");
> >
> >    Is it safe to use this kind of query in
> Appfuse.
> >
> > Thanks,
> >
> > Pankaj
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sponsored Link
> >
> > $200,000 mortgage for $660/ mo -
> > 30/15 yr fixed, reduce debt -
> > http://yahoo.ratemarketplace.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [hidden email]
> > For additional commands, e-mail:
> [hidden email]
> >
> >
>




____________________________________________________________________________________
Sponsored Link

Compare mortgage rates for today.
Get up to 5 free quotes. www2.nextag.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Pankaj

Re: How to use hibernate to delete multiple records in Appfuse?

Reply Threaded More More options
Print post
Permalink
Hi,

    Thanks for your replies. I am using Appfuse 1.7
and it has hibernate 2. It is an application which I
was working on  sometime back and then moved on to
other applications. I might upgrade hibernate version
if I couldn't find solution.

   Mean while I found a method in Hibernate2 api:
int delete(String queryString)  

which is suppose to delete the recods returned by the
query. Any ideas about this ? I am trying to use it
but at this time I am getting some errors which I
think might be from my query and once my query is
right, I could check if it works.

Thanks,

Pankaj
--- Michael Horwitz <[hidden email]> wrote:

> Hi Pankaj,
>
> If you are using AppFuse 1.7 it may be that the
> version of Hibernate +
> Spring is too old to contain the required
> functionality. Bulk operation
> statements are fairly new in Hibernate. Have you
> considered upgrading to a
> newer version of AppFuse?
>
> If not you should be able to obtain a database
> connection from the Hibernate
> session and use the Spring JDBC utilities to perform
> the bulk update
> operations.
>
> Regards
>
> Mike Horwitz
>
>
> On 11/22/06, Smiley, Stuart A.
> <[hidden email]> wrote:
> >
> > Are you looking at
> org.springframework.orm.hibernate.HibernateTemplate.
>  The
> > method is in
>
org.springframework.orm.hibernate3.HibernateTemplate.
> >
> > Stuart
> >
> > -----Original Message-----
> > From:
>
[hidden email]
> >
>
[mailto:[hidden email]

> > ]On Behalf Of pankaj singla
> > Sent: Wednesday, November 22, 2006 11:38 AM
> > To: [hidden email]
> > Subject: Re: [appfuse-user] How to use hibernate
> to delete multiple
> > records in Appfuse?
> >
> >
> > Hi Joao,
> >
> >          Thanks for the reply. But I didn't find
> any
> > bulkUpdate() method into the Spring
> HibernateTemplate
> > API. Is there something I am missing.....
> >
> >
> >
> > --- Joao Nelas <[hidden email]> wrote:
> >
> > > You could use :
> > >
> > > getHibernateTemplate().bulkUpdate("delete book
> FROM
> > > org.mycompany.Book as
> > > book where type = 'technical' ");
> > >
> > > João Nelas
> > >
> > > On 11/21/06, pankaj singla <[hidden email]>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > >        I am using appfuse 1.7 in one of my
> > > > applications. I want to delete multiple
> records
> > > from
> > > > one of my tables. One way to do is to get a
> > > collection
> > > > of records to be deleted in action and call
> delete
> > > on
> > > > individual object.
> > > >        What is a food way to delete them
> together?
> > > One
> > > > method is:
> > > > HibernateTemplate.deleteAll(Collection);
> > > >
> > > > but then I have to first get a collection. I
> was
> > > > thinking more in terms of this:
> > > >
> > > > Session sess =
> HibernateFactory.currentSession();
> > > > sess.delete("select book FROM
> org.mycompany.Book
> > > as
> > > > book where type = 'technical'");
> > > >
> > > >    Is it safe to use this kind of query in
> > > Appfuse.
> > > >
> > > > Thanks,
> > > >
> > > > Pankaj
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
>
____________________________________________________________________________________

> > > > Sponsored Link
> > > >
> > > > $200,000 mortgage for $660/ mo -
> > > > 30/15 yr fixed, reduce debt -
> > > > http://yahoo.ratemarketplace.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------

> > > > To unsubscribe, e-mail:
> > > [hidden email]
> > > > For additional commands, e-mail:
> > > [hidden email]
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sponsored Link
> >
> > Compare mortgage rates for today.
> > Get up to 5 free quotes. www2.nextag.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [hidden email]
> > For additional commands, e-mail:
> [hidden email]
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [hidden email]
> > For additional commands, e-mail:
> [hidden email]
> >
> >
>



 
____________________________________________________________________________________
Sponsored Link

Online or Campus degree Associate's, Bachelor's, or Master's
in less than one year.www.findtherightschool.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Pankaj

Re: How to use hibernate to delete multiple records in Appfuse?

Reply Threaded More More options
Print post
Permalink
I used int delete(String queryString)in
HibernateTemplate and it worked fine.

   Thanks for your help and time.

Pankaj
--- pankaj singla <[hidden email]> wrote:

> Hi,
>
>     Thanks for your replies. I am using Appfuse 1.7
> and it has hibernate 2. It is an application which I
> was working on  sometime back and then moved on to
> other applications. I might upgrade hibernate
> version
> if I couldn't find solution.
>
>    Mean while I found a method in Hibernate2 api:
> int delete(String queryString)  
>
> which is suppose to delete the recods returned by
> the
> query. Any ideas about this ? I am trying to use it
> but at this time I am getting some errors which I
> think might be from my query and once my query is
> right, I could check if it works.
>
> Thanks,
>
> Pankaj
> --- Michael Horwitz <[hidden email]> wrote:
>
> > Hi Pankaj,
> >
> > If you are using AppFuse 1.7 it may be that the
> > version of Hibernate +
> > Spring is too old to contain the required
> > functionality. Bulk operation
> > statements are fairly new in Hibernate. Have you
> > considered upgrading to a
> > newer version of AppFuse?
> >
> > If not you should be able to obtain a database
> > connection from the Hibernate
> > session and use the Spring JDBC utilities to
> perform
> > the bulk update
> > operations.
> >
> > Regards
> >
> > Mike Horwitz
> >
> >
> > On 11/22/06, Smiley, Stuart A.
> > <[hidden email]> wrote:
> > >
> > > Are you looking at
> >
> org.springframework.orm.hibernate.HibernateTemplate.
> >  The
> > > method is in
> >
>
org.springframework.orm.hibernate3.HibernateTemplate.
> > >
> > > Stuart
> > >
> > > -----Original Message-----
> > > From:
> >
>
[hidden email]
> > >
> >
>
[mailto:[hidden email]

> > > ]On Behalf Of pankaj singla
> > > Sent: Wednesday, November 22, 2006 11:38 AM
> > > To: [hidden email]
> > > Subject: Re: [appfuse-user] How to use hibernate
> > to delete multiple
> > > records in Appfuse?
> > >
> > >
> > > Hi Joao,
> > >
> > >          Thanks for the reply. But I didn't find
> > any
> > > bulkUpdate() method into the Spring
> > HibernateTemplate
> > > API. Is there something I am missing.....
> > >
> > >
> > >
> > > --- Joao Nelas <[hidden email]> wrote:
> > >
> > > > You could use :
> > > >
> > > > getHibernateTemplate().bulkUpdate("delete book
> > FROM
> > > > org.mycompany.Book as
> > > > book where type = 'technical' ");
> > > >
> > > > João Nelas
> > > >
> > > > On 11/21/06, pankaj singla
> <[hidden email]>
> > > > wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > >        I am using appfuse 1.7 in one of my
> > > > > applications. I want to delete multiple
> > records
> > > > from
> > > > > one of my tables. One way to do is to get a
> > > > collection
> > > > > of records to be deleted in action and call
> > delete
> > > > on
> > > > > individual object.
> > > > >        What is a food way to delete them
> > together?
> > > > One
> > > > > method is:
> > > > > HibernateTemplate.deleteAll(Collection);
> > > > >
> > > > > but then I have to first get a collection. I
> > was
> > > > > thinking more in terms of this:
> > > > >
> > > > > Session sess =
> > HibernateFactory.currentSession();
> > > > > sess.delete("select book FROM
> > org.mycompany.Book
> > > > as
> > > > > book where type = 'technical'");
> > > > >
> > > > >    Is it safe to use this kind of query in
> > > > Appfuse.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Pankaj
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
____________________________________________________________________________________

> > > > > Sponsored Link
> > > > >
> > > > > $200,000 mortgage for $660/ mo -
> > > > > 30/15 yr fixed, reduce debt -
> > > > > http://yahoo.ratemarketplace.com
> > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------

> > > > > To unsubscribe, e-mail:
> > > > [hidden email]
> > > > > For additional commands, e-mail:
> > > > [hidden email]
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________
> > > Sponsored Link
> > >
> > > Compare mortgage rates for today.
> > > Get up to 5 free quotes. www2.nextag.com
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > [hidden email]
> > > For additional commands, e-mail:
> > [hidden email]
> > >
> > >
> >
>
---------------------------------------------------------------------

> > > To unsubscribe, e-mail:
> > [hidden email]
> > > For additional commands, e-mail:
> > [hidden email]
> > >
> > >
> >
>
>
>
>  
>
____________________________________________________________________________________
> Sponsored Link
>
> Online or Campus degree Associate's, Bachelor's, or
> Master's
>
=== message truncated ===



 
____________________________________________________________________________________
Sponsored Link

Online or Campus degree Associate's, Bachelor's, or Master's
in less than one year.www.findtherightschool.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

1 2