Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Problem in Using Database.

Problem in Using Database.

2004-01-12       - By Jin Chun

 Back
Reply:     1     2     3     4     5     6     7     8  

The easiest thing to do IMHO is to have your thread started in the web tier
via a servlet, using something like quartz (an open source j2ee scheduler).
Have your code
running in the web tier use a facade to invoke the logic in a stateless
session bean.

Jin

Jin Chun


Vice President: Sr. Systems Architect


State Street ? Global Link | www.statestreet.com | www.globallink.com


617.664.1695 | byungchun@(protected)


SCJA SCJP OCP-DBA








Confidentiality Notice:  The information contained in the email is intended
for the confidential use of the above-named recipient(s).  If the reader of
this message is not the intended recipient or person responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error, and that any review,
dissemination, distribution, or copying of this communication is strictly
prohibited.  If you have received this in error, please notify the sender
immediately and destroy this message.


|-- ------+-- ---- ---- ---- ---- ---- ---- --->
|         |           Nishidhdha Narendra Shah |
|         |           <nishidhdha_shah@(protected)|
|         |           COM>                     |
|         |           Sent by: An interest list|
|         |           for Sun Java Center J2EE |
|         |           Pattern Catalog          |
|         |           <J2EEPATTERNS-INTEREST@(protected)|
|         |           VA.SUN.COM>              |
|         |                                    |
|         |                                    |
|         |           01/12/2004 01:10 AM      |
|         |           Please respond to An     |
|         |           interest list for Sun    |
|         |           Java Center J2EE Pattern |
|         |           Catalog                  |
|         |                                    |
|-- ------+-- ---- ---- ---- ---- ---- ---- --->
 >-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --|
 |                                                                            
                                                                |
 |       To:       J2EEPATTERNS-INTEREST@(protected)                        
                                                                |
 |       cc:                                                                  
                                                                |
 |       Subject:  Re: Problem in Using Database.                            
                                                                |
 >-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --|




But Anil, As per J2EE spec you can not start any thread form bean. U must
have to use another session bean.





Regards,


Nishi











     -- --Original Message-- --
     From: Anil Kumar [mailto:anil007dc@(protected)]
     Sent: Monday, January 12, 2004 11:39 AM
     To: J2EEPATTERNS-INTEREST@(protected)
     Subject: Re: Problem in Using Database.





     Here my problem is I am trying to invoke a Batch process from my
     stateless session bean when I get a request.. In the Batch Process
     all I need to do is batch update of tables and select from the tables
     updated and push the results as text files to a ftp server. This
     process should happen irrespective to my  EJB Transaction. Frequency
     of this batch process is not more than once a day.





     What I am thinking is creating a Java Class (A) and instantiate from
     my state less session EJB . And Class A kicks off thread for the
     Batch Process when ever there is a need for it.  what do you think??



     Nishidhdha Narendra Shah <nishidhdha_shah@(protected)> wrote:
      Hi Anil





      Instead of starting thread, why don't you make another bean, which
      will update and return rows and make sure its transaction attribute
      RequireNew so it can start own new transaction instead of global
      transaction. I guess this is the best practice. What do u say?





      Nishi





            -- --Original Message-- --
            From: Pradeep Kumar [mailto:pradeepk@(protected)]
            Sent: Monday, January 12, 2004 9:49 AM
            To: J2EEPATTERNS-INTEREST@(protected)
            Subject: Re: Problem in Using Database.





            You are not supposed to start a thread or do anything in your
            EJB. Especially if you are using XA, since this will interfere
            with the XA transaction manager.





                  -- --Original Message-- --
                  From: Anil Kumar [mailto:anil007dc@(protected)]
                  Sent: Monday, January 12, 2004 7:15 AM
                  To: J2EEPATTERNS-INTEREST@(protected)
                  Subject: Problem in Using Database.





                  Hi,





                   I am trying to do the following.


                  I am using XA Datasource for DB2/390 from my
                  application. In my application I am having a session
                  beans and Domain objects and Data Access objects. we are
                  using websphere Application Server 5.0





                  We are using XA Datasource because we need to insert and
                  update tables in multiple databases.





                  I had a problem when I try to update some records and
                  try to access the same records in the same transaction.
                  I am getting Invocation Exception.





                  Here are some questions





                  1) I want to create a class extending thread and start
                  thread from EJB state less session Brean so that I can
                  do the update and selection of rows from the database
                  external to the Global Transaction





                  Any suggestions.





                  Thanks


                  Anil





                  Do you Yahoo!?
                  Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
                  ============================================================
========

                  ompanion Site: http://www.corej2eepatterns.com J2EE
                  BluePrints:
                  http://java.sun.com/blueprints/corej2eepatterns List
                  Archive:
                  http://archives.java.sun.com/archives/j2eepatterns-interest
.html
                   Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
                  listserv@(protected)


            DISCLAIMER:
            This message (including attachment if any) is confidential and
            may be privileged. Before opening attachments please check
            them for viruses and defects. MindTree Consulting Private
            Limited (MindTree) will not be responsible for any viruses or
            defects or any forwarded attachments emanating either from
            within MindTree or outside. If you have received this message
            by mistake please notify the sender by return e-mail and
            delete this message from your system. Any unauthorized use or
            dissemination of this message in whole or in part is strictly
            prohibited. Please note that e-mails are susceptible to change
            and MindTree shall not be liable for any improper, untimely or
            incomplete transmission.


      ====================================================================

      ompanion Site: http://www.corej2eepatterns.com J2EE BluePrints:
      http://java.sun.com/blueprints/corej2eepatterns List Archive:
      http://archives.java.sun.com/archives/j2eepatterns-interest.html
      Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
      listserv@(protected)





     Do you Yahoo!?
     Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
     ===================================================================    
Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:
     http://java.sun.com/blueprints/corej2eepatterns List Archive:
     http://archives.java.sun.com/archives/j2eepatterns-interest.html
     Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
     listserv@(protected)


===================================================================Companion
Site: http://www.corej2eepatterns.com J2EE BluePrints:
http://java.sun.com/blueprints/corej2eepatterns List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)







===================================================================Companion
Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.