Design strategy of database class

Hello,
I am developing a (XML-)DOM-based database class, storing specific information in trees and providing some public methods modify all database content (add, remove, etc.) All these methods work with path parameter of the type String, to access objects in the DB.
Now I've decided to reimplement the class and do it this way: Add a public method
DatabaseObject getObject(String path)
to the class. This method returns a new-created DatabaseObject. The interface DatabaseObject, provides methods like getName(), getProperty(), ... getChildren(), ... So you can deal with the objects itself and you do not have to ask the database class.
I have planned to create a class DatabaseObjectImpl which implements the DatabaseObject interface. Database.getObject created then a new instance of a DatabaseObjectImpl object.
My question is: What ways are possible to implement the DatabaseObjectImpl transaction with the parent database class. First a thought of implementing it this way. DatabaseObjectImpl is given the Database by its construction (in the constructor). Every time a DatabaseObject does data in-/output, it uses the methods in the parent database. (A database object also "knows" its path in the DB, also given by its construction). But I don't like this design.
Is there a way of letting the DatabaseObjectImpl's do the modification securely by itself? The database uses Xerces-J DOM-Documents. There is one catch, I don't know, how to secure it:
A user of Database fetches a DatabaseObject A to the path "/Java/is/great" via the getObject method in Database. Later, he also fetches a DatabaseObject B of "/Java". Now he calls B.delete(). Right now the object A should be valid, but the subtree /Java does not exist anymore.
What is the professional way, to solve this problem?
Was my first thought (let the database do all modification, called from objects) better than implementing the modification in the database objects?
Is my idea of providing objects to modify the database content bad?
Frank Wefers

I'm using XML via DOM as storage of the data of the database class. But I don't want to let the user of my class work on the DOM document. I want to provide him a database specific interface for modifying the db. The question, who can this be done care securely, if I want to give the user of my class instances of special objects, "DatabaseObject", which handle the modification and so on.
I did not like the way to do all modification directly through the instance of the database class.
An example:
Getting the name of an object in the database at the path
/root/folder/object:
Method A: Via Database-class methods (which I don't want)
String name = db.getObjectName("/root/folder/object");
Method B: Via Objects which handle everything:
DatabaseObject object = db.getObject("/root/folder/object");
String name = object.getName();
Via the second way, it would be also easy to do something like this:
object.getChildren();
object.getParent();
object.appendChild(new DatabaseObject("New Name"));
and so on...
So this DatabaseObject-class must in some way deal with the database class, which covers the database information. The DatabaseObject is only for simplify the handling.
How should the Database and the DatabaseObject be implemented securely (see figured problem in my first posting) regarding their communication?
Greetings,
Frank

Similar Messages

  • Package designing strategy (may be stupid question)

    Hi,
    I always run into this problem while deciding package structure. Hope I can get it resolved once and for all here.
    There are customer and products domain objects. I will create seperate packages for them. Say each package will have several classes working together. I am showing only the core classes Customer.java and Product.java. The domain objects access database via database classes from corresponding "db" packages. Thus the structure looks like :
    \---root
    +---cust
    | | Customer.java
    | |
    | \---db
    | Customer.java
    |
    \---prod
    | Product.java
    |
    \---db
    Product.java
    Here is the problem :
    The above structure looks very logical to me but I have following issue:
    How to make root.prod.db.* accessible to root.prod.* only since it has no business outside it. Similarly the customer classes.
    I donot want to merge db.* classes with its parent as I want to keep database access classes seperate. I do not see any way around it.
    What is the approach generally taken for this very common issue or is it not an issue at all ?
    Should there not be a new visibility indicator which will allow the members to be visible to classes of its immediate parent package and current package only ?
    Thanx
    ~Tony

    I have found that package-protected access can be a
    huge benefit to creating reliable and highly efficient
    code. When you separate your classes out into sub
    packages this way, you lose the ability to use this
    tool. You might want to consider thinking about what
    classes will need to interact closely with each other.I am aware of all that u said and agree with it
    Will your db classes be populating the business
    objects with data? Generally it will be other way around.
    Do you want to force your data
    loading to have to go through setters or would it be
    beneficial to load the fields directly without
    exposing those fields to classes outside the package?Generally fields r not exposed.
    When you separate classes that are intractably
    y coupled in the design, you are creating headaches
    for yourself.How to get rid of that headache ?
    >
    Of course there are many schools of thought on this
    but I found that the package-protected modifier was
    extremely useful on my current project.
    There is also a problem with package sprawl. Don't
    create a package unless you plan to put more than a
    couple classes in it.If I understand u correctly, u are suggesting to put db classes with business. With due respect, this won't solve my prob as I want to keep db access logic seperate (my original question).

  • OO Design--do ABAP Persistent Classes make sense for ALV reports in NW2004?

    Hello experts,
    At our company, we started using ABAP OO in the last year.
    I am on NW-2004 .  We just acquired a business that is on 4.6C.
    We have a lot of customization to bring into our system. There are a lot of reports with common queries that span multiple tables.
    I would like to follow the best practice for OO design and create global classes for the data access layer  the business logic layer and the UI layer.  For the UI layer, I will be utilizing the SALV class, since NW2004 doesn't have ABAP WebDynpro (we don't have a java stack available for development and software change management).
    For the data access layer,  I would like to use the persistent classes,  but without the query manager, it just doesn't make sense.
    Thomas Jung said in a blog that he sometimes used SQL to get the keys and then used persistent classes to retrieve the remaining data.  But for straight ALV reporting, that just seems inefficient.  But it could be that I am just not familiar enough with the technology.
    I am looking for suggestions on how to design the data access layer for these intense  and commonly used queries.
    (Ironically, we will upgrade to NW2004s after this migration -- ouch!)
    All ideas are appreciated.
    Thanks.

    Hi Kimberly,
    the main advantage of persistent objects is that their state can be saved in the database. If a persistent object changes in your program, these changes can be reflected in the corresponding database field(s). Thus, persistent objects are very useful when doing CRUD (create, read, update and delete) operations with business objects.
    However, if you just want to read data (for simple reporting) but do not plan to implement any of the other CRUD operations, I doubt if a persistency layer is necessary since this causes extra effort during design time and runtime. In that case, simple SELECT statements seem to be more appropriate.
    Regards,
    David

  • Design Strategy - RMI

    I would like to access a class locally as well as remotely. I already have a class Dog with a method eat(). It is simple enough to access this method locally, but what would be the best way of doing it remotely? I don't want to modify Dog, so would I put a wrapper around it that has remote methods that are essentially the Dog class methods?
    I guess simply put, I would like to have a strategy of implementing remote calls on a given class, but not modify that class in order to do this. Is this even possible?
    Thanks!
    AR.

    Since this question is about design strategy ...
    First you have to be clear why you want to make Dog remotely accessible. Are many clients supposed to access the Dog? If so then is it the same Dog or is there a distinct one for each client.
    RMI needs atleast one reference to a bound object. So this is what the clients would access to get a remote reference to a remote Dog object.
    You can keep your current Dog implementation, but atleast create two interfaces that define the remote PetStore/Kennel and Dog. The implementation of the Dog remote interface can be done either by the Dog class you already have or a proxy class that delegates to an instance of the Dog class you already have. Simply put, a stub that invokes methods on the Dog class instance. That will keep the remoteness decoupled from the original class. Another benefit of the proxy method is that you can create a proxy for each client and meter their usage of your remote object!
    I think this is quite like the GoF Mediator pattern.

  • Logical Database design and physical database implementation

    Hi
    I am an ORACLE DBA basically and we started a proactive server dashboard portal ,which basically reports all aspects of our infrastructure (Dev,QA and Prod,performance,capacity,number of servers,No of CPU,decomissioned date,OS level,Database patch level) etc..
    This has to be done entirely by our DBA team as this is not externally funded project.Now i was asked to do " Logical Database design and physical Database
    implementation"
    Even though i know roughly what's that mean(like designing whole set of tables in star schema format) ,i have never done this before.
    In my mind i have a rough set of tables that can be used but again i think there is lot of engineering involved in this area to make sure that we do it properly.
    I am wondering you guys might be having some recommendations for me in the sense where to start?are there any documents online , are there any book on this topic?Are there any documents which explain this phenomena with examples ?
    Also exactly what is the difference between logical database design vs physical database implementation
    Thanks and Regards

    Logical database design is the process of taking a business or conceptual data model (often described in the form of an Entity-Relationship Diagram) and transforming that into a logical representation of that model using the specific semantics of the database management system. In the case of an RDBMS such as Oracle, this representation would be in the form of definitions of relational tables, primary, unique and foreign key constraints and the appropriate column data types supported by the RDBMS.
    Physical database implementation is the process of taking the logical database design and translating that into the actual DDL statements supported by the target RDBMS that will create the database objects in a target RDBMS database. This will generally include specific physical implementation details such as the specification of tablespaces, use of specialised indexing (bitmap, clustered etc), partitioning, compression and anything else that relates to how data will actually be physically stored inside the database.
    It sounds like you already have a physical implementation? If so, you can reverse engineer this implementation into a design tool such as SQL Developer Data Modeller. This will create a logical design by examining the contents of the Oracle data dictionary. Even if you don't have an existing database, Data Modeller is a good tool to use as a starting point for logical and even conceptual/business models.
    If you want to read anything about logical design, "An Introduction to Database Systems" by Date is always a good starting point. "Database Systems - A Practical Approach to Design, Implementation and Management" by Connolly & Begg is also an excellent reference.

  • How to design a 3D database in SDO

    Hi,
    I need to design a 3D database in Oracle9i SDO. As we know, this SDO support the 2D GIS seamlessly. How to design a 3D database in Oracle9i SDO,
    Could any person have some experiences. Thanks!
    Best regards!

    Hello All!
    Due to my diplom thesys I have to create a real 3D (not 2 1/2D) database in Oracle. You seem to have a little experience in this subject and I hope you can tell me whether my plan is possible or not...
    The data I'd like to store in the database is/are BRep, means a 3D-Objekt composed of many coplanar 2D-planes. I think storing the data won't be the problem because I can store the vertices of the 2d-polygons with x,y,z values. The queries will be the main problem. I have to query all types of intersection, neighborhood and some distance between the objects.
    I know, SDO_RELATE is the only filter which supports three dimensions, but there's something I don't understand:In the spatial user's guide it says:
    "the SDO_RELATE operator, can be used to determine with certainty if objects interact spatially".
    WHAT does this mean in case of 3D? True if the two objects intersect, false if not?
    Hongwei: How is your project doing? maybe we can exchange some experience...
    Many Questions, hoping for some help...;-)
    regards from germany,
    Markus Reuter

  • Please help me in designing this complicated database

    Can some one give me a better idea on how to design this complicated database.The database should capture the following business rule.
    I am working for a company which collects all the health information of patients from various hospitals and then using this data ,generate useful reports ,which will then be forwarded to health minister so that he can allocate money to particular area of health.
    We have some list number codes 1,2,3,4,5,6,7,8,9 etc and each list number has thousands of diseases under it.Hence cancer,TB,heart attack,flu,diarhoea comes under list number 1 and amnesia,dehydration,small pox comes under list number 2 ,and so on so forth.Now if a patient say has a disease from list number 1 and another disease from list number 2 and then from list number 3 then he is grouped in one category say group1.If he has a disease from only list 1 and 2 then he is grouped as group2.And if only list number 1 then group3.In short the data is something like this
    1,2,3,group1
    1,2, group2
    1, group3
    1,3,6,7,8,grou7
    1,8,group2
    1,9,group3
    etc.

    Table Name
    List_Codes
    List_Code Number(3); Primary Key
    Disease_Codes
    Disease_Code Number(3)
    Disease_Desc Varchar2(100)
    List_Code Number(3);
    Primary Key : Disease_Codes + List_Code
    Foriegn Key : List_Code ( References table
    List_Codes )
    List_Groups
    Group_Id Number(2) Primary Key
    List_Group_Details
    Group_Id Number(2)
    Disease_Code Number(3)
    List_Code Number(3)
    Primary Key : Group Id + Disease_Codes +
    List_Code
    Foriegn Key : Group Id ( List_Groups )
    Foriegn Key : Disease Code + List_Code (
    Disease_Codes )
    Patient_Details
    Patient_Id Number Primary Key
    Patient_Name Varchar2(50);
    Group_Id Number(2);
    Foriegn Key : Group Id ( List_Groups )
    Shailender Mehta

  • Can you plz tell m how to write Design Strategy in the scenario IDoc-- File

    Hi,
    can any body plz tell me how to write Design strategy, Preprocessing logic and post processing logic in the scenario IDoc-->File.
        My idoc is:
                Message Type: ZMMIPORDCHG
                Basic Type  : ORDERS05.
    lookup's are available.

    Hi,
    take a look at this document for an IDOC to IDOC Scenario,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cdded790-0201-0010-6db8-beb9bb2b2660
    Use it as a template to design one side of the Interface and also take a look at this blog,
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    Regards,
    Bhavesh

  • [XELLERATE.DATABASE] Class/Method: DirectDB/getConnection encounter some

    [XELLERATE.DATABASE] Class/Method: DirectDB/getConnection encounter some problems: Error while retrieving database connection.Please check for the follwoing
    ERROR [XELLERATE.DATABASE] Class/Method: tcDataBase/readPartialStatement encounter some problems: Got a null connection
    java.sql.SQLException: Got a null connection
         at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.readStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.getError(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
         at com.thortech.xl.dataobj.tcUSR.createUser(Unknown Source)
         at com.thortech.xl.dataobj.tcREQ.selfRegisterUser(Unknown Source)
         at com.thortech.xl.dataobj.tcREQ.launchEntityDERActions(Unknown Source)
         at com.thortech.xl.dataobj.tcREQ.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.checkOrcTarget(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.setOrderContentItemStatus(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.setOrderContentItemStatus(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.checkOrderContentItem(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.updateTask(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.updateTask(Unknown Source)
         at com.thortech.xl.ejb.beans.tcProvisioningOperationsSession.updateTask(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
         at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:873)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
         at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
         at $Proxy325.updateTask(Unknown Source)
         at Thor.API.Operations.tcProvisioningOperationsClient.updateTask(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy782.updateTask(Unknown Source)
         at com.thortech.xl.webclient.actions.ApprovalsAction.approveDenyTasks(Unknown Source)
         at com.thortech.xl.webclient.actions.ApprovalsAction.confirmApprove(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    *2008-11-18 15:33:43,175 ERROR [XELLERATE.SERVER] Class/Method: tcDataObj/handleError encounter some problems: {1}*
    com.thortech.xl.orb.dataaccess.tcDataAccessException     at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.readStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.getError(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
         at com.thortech.xl.dataobj.tcUSR.createUser(Unknown Source)
         at com.thortech.xl.dataobj.tcREQ.selfRegisterUser(Unknown Source)
         at com.thortech.xl.dataobj.tcREQ.launchEntityDERActions(Unknown Source)
         at com.thortech.xl.dataobj.tcREQ.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.checkOrcTarget(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.setOrderContentItemStatus(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.setOrderContentItemStatus(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.checkOrderContentItem(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.updateTask(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.updateTask(Unknown Source)
         at com.thortech.xl.ejb.beans.tcProvisioningOperationsSession.updateTask(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
         at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:873)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
         at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
         at $Proxy325.updateTask(Unknown Source)
         at Thor.API.Operations.tcProvisioningOperationsClient.updateTask(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy782.updateTask(Unknown Source)
         at com.thortech.xl.webclient.actions.ApprovalsAction.approveDenyTasks(Unknown Source)
         at com.thortech.xl.webclient.actions.ApprovalsAction.confirmApprove(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    This is the error thrown when we are running the GTC Connector.
    What might be the cause?Please suggest some sort of solution to this.
    We are using GTC Connector to mass import the users from a FLAT FILE.
    Thank you
    Regards

    Hi,
    2008-11-19 13:52:36,446 ERROR [XELLERATE.SERVER] Class/Method: tcDataObj/save Error :Insertion of dataobject into database failed
    2008-11-19 13:52:36,462 ERROR [XELLERATE.DATABASE] Class/Method: tcDataBase/rollbackTransaction encounter some problems: Rollback Executed From
    java.lang.Exception: Rollback Executed From
         at com.thortech.xl.dataaccess.tcDataBase.rollbackTransaction(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.rollback(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.doRollback(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.createUserRecord(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.applyActionRules(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.checkDataSorted(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
         at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
         at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
         at org.jboss.ejb.Container.invoke(Container.java:873)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
         at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
         at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
         at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
         at org.jboss.mq.SpySession.run(SpySession.java:333)
         at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
         at java.lang.Thread.run(Thread.java:534)
    2008-11-19 13:52:36,462 ERROR [XELLERATE.SERVER] Class/Method: tcDataObj/save Error :Wrong SQL operation for save
    2008-11-19 13:52:36,462 WARN [XELLERATE.DATABASE] Trying to get the connection count : 0
    2008-11-19 13:52:36,462 WARN [XELLERATE.DATABASE] Trying to get the connection count : 1
    2008-11-19 13:52:36,462 WARN [XELLERATE.DATABASE] Trying to get the connection count : 2
    2008-11-19 13:52:36,462 WARN [XELLERATE.DATABASE] Trying to get the connection count : 3
    2008-11-19 13:52:36,462 WARN [XELLERATE.DATABASE] Trying to get the connection count : 4
    2008-11-19 13:52:36,462 ERROR [XELLERATE.DATABASE] Class/Method: DirectDB/getConnection encounter some problems: Error while retrieving database connection.Please check for the follwoing
    Database srever is running.
    Datasource configuration settings are correct.
    2008-11-19 13:52:36,462 ERROR [XELLERATE.DA.
    TABASE] Class/Method: tcDataBase/readPartialStatement encounter some problems: Got a null connection
    java.sql.SQLException: Got a null connection
    I got the above said error also.
    when u encountered this kind of problem ,how u resloved the issue.
    Thanks,

  • Access database class

    my access database class has some kind of error does anyone has a database access class that connects and has a mettod that searchs and sends vectors whit the search and modifies???? if you want i can put here the class that i have

    Read this:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=271751&tstart=30&trange=15
    And this:
    http://www.catb.org/~esr/faqs/smart-questions.html
    Jesper

  • Design of Sharemarket database

    Hi One and All,
    I have a query regarding, design of New database....
    Right now I joined as a Database administrator as a fresher, my superior has given me one assignment i.e. I have to create a sample database on Share market. As per his requirement the tables should be Issuer table, Security table, Broker table, INvestor table, Account table, Order table, Tradeing table. He said that I have to prepare the fiellds for this tables and relation ships and whole database structure.... I can prepare relations ships and database structure but the problem is, I don't know how the stock market is really works. If any body help me in this issue I am very thank full to him.
    I need just the table feilds, if I get this rest of job i wil do by studying the subject of share market.
    Thank You

    That was his test for you I believe. This is where your Analyst skills come into play. You are not (and he is not expecting) expected to know the fields that relate to each sectior you will be working on. You start by doing some requirements gathering. Ask him for documentations that could help you pickup information about the market and get to choose the fields that will help with your design.
    There will be a whole lot of Stock Market information out there online that you can search for. You can even download sample .Net or Access applications to help you get started. But if your company already deals with that market, then he is testing to see how you can fit in witht he project I am not sure what your educational background is, but when you get to Database Design environment, most things you learnt from school and did in your projects comes back to life. So remember the life cycles etc. Make use of it.
    Goodluck.

  • Regarding database class loader

    After write class.forName("drivername"); how does it work internally?

    No such thing as a "database class loader"; it just uses the normal class loader.
    1) class.forName("drivername") load the class, just like any other class.
    2) a JDBC driver class that conforms to the JDBC specification will have an init block which registers the just loaded driver class with the DriverManager by calling its registerDriver() method.

  • Strategy for database exceptions

    I am designing our strategy for handling database exceptions which may occur upon saving for instance.
    For example, if a user tries to save an object which violates a unique key constraint, I get that error wrapped by the DatabaseException class as documented.
    The wrinkle is that I would really like to report to the user which fields caused this violation. We are using an oracle database for the foreseeable future, so portability is not critical.
    Has anyone designed something which can get this metadata and attach it to the exception? Any tips would be much appreciated.
    Cheers,
    craig

    I have found it very helpfull to separate the database / recordset from the rest of the project. If you create objects that model your records then the rest of your program doesn't know or care where the data came from. You could easily write store / retrieve methods to deal with the data from a file, over the web, from a socket connection, etc without having to alter your entire app. My advise is to do as little manipulation on the resultsets and focus on object manipulation instead. Mind you if your writing some sort of generic recordset "explorer" then this doesn't apply. You can't possibly model objects from some random recordset that you have no previous knowledge of. In that case you'd have to examine the meta data of the recordset to get field names, data types, etc.

  • Design question for database connection in multithreaded socket-server

    Dear community,
    I am programming a multithreaded socket server. The server creates a new thread for each connection.
    The threads and several objects witch are instanced by each thread have to access database-connectivity. Therefore I implemented factory class which administer database connection in a pool. At this point I have a design question.
    How should I access the connections from the threads? There are two options:
    a) Should I implement in my server class a new method like "getDatabaseConnection" which calls the factory class and returns a pooled connection to the database? In this case each object has to know the server-object and have to call this method in order to get a database connection. That could become very complex as I have to safe a instance of the server object in each object ...
    b) Should I develop a static method in my factory class so that each thread could get a database connection by calling the static method of the factory?
    Thank you very much for your answer!
    Kind regards,
    Dak
    Message was edited by:
    dakger

    So your suggestion is to use a static method from a
    central class. But those static-methods are not realy
    object oriented, are they?There's only one static method, and that's getInstance
    If I use singleton pattern, I only create one
    instance of the database pooling class in order to
    cionfigure it (driver, access data to database and so
    on). The threads use than a static method of this
    class to get database connection?They use a static method to get the pool instance, getConnection is not static.
    Kaj

  • Object oriented design problem concerning abstract classes and interfaces

    I have an abstract class (class A) that takes care of database connections. It cannot be made into an interface as other classes extend it and all these other classes require the functionality in the methods it has (i.e. I cannot make all the methods abstract and then make this class an interface).
    I have a class that contains data (Customer class) that I will create from the data I extract from the database. This class will also be created by the User and submitted to the database portion of the program. The Customer class has functionality in its methods which is required by the rest of the program (i.e. I cannot make all the methods abstract and then make this class an interface).
    I have a factory class (CustomerFactory) that extends the Customer class. This has been created to restrict access to the creation and manipulation of Customers.
    I have a class (DatabaseQuery) that extends class A. But now that I have retrieved all of the information that comprises a Customer from the database, I cannot construct a Customer without making reference to UserFactory. But UserFactory is a class that I don't want the database portion of the program to know about.
    What I would like to do is have my DatabaseQuery class extend both Customer class and A class. But they are both classes and Java won't allow that.
    I can't make either of the two classes that I want to make parents of DatabaseQuery into interfaces... so what can I do other than just keep a reference to UserFactory in my DatabaseQuery class?
    Thanks,
    Tim

    >
    What I would like to do is have my DatabaseQuery class
    extend both Customer class and A class. But they are
    both classes and Java won't allow that.
    I can't make either of the two classes that I want to
    make parents of DatabaseQuery into interfaces... so
    what can I do other than just keep a reference to
    UserFactory in my DatabaseQuery class?Just a guess...
    The description sounds a little vague but it sounds like the correct solution would be to refactor everything. The first clue is when I see "database connection" as an "abstract class". The only hierarchy that a database connection might exist in is in a connection pool and even that is probably shaky. It should never be part of data records, which is what your description sounds like.
    That probably isn't what you want to hear.
    The other solution, which is why refactoring is better (and which also makes it apparent why the original design is wrong) is to create an entire other hierarchy that mirrors your current data hierarchy and wraps it. So you now have "Customer", you will now have "Customer" and "DBCustomer". And all the code that currently uses "Customer" will have to start using DBCustomer. Actually it is easier than that since you can simply make the new class be "Customer" and rename the old class to "DBCustomer". Naturally that means the new class will have to have all of the functionality of the old class. Fortunately you can use the old class to do that. (But I would guess that isn't going to be easy.)

Maybe you are looking for