Data Access Layer

Hi:
Does anyone have a provider independent .net data access layer including odp.net?
Thanks
Ram

I am looking for something similar, but I am not too
sure how it would work.
I have tried developing one myself, using the
underlying interface classes, but I am unsure how to
overcome the differences between SQL Server and
Oracle when returning result sets. SQL Server is
happy to return a DataSet from a stored procedure,
but Oracle must be given a Ref Cursor variable
parameter for each DataTable returned.
This means that the calling code must differ between
SQL Server and Oracle.
If anyone can suggest a neat way to get over this,
I'd appreciate it.
Check out the DAABv3 from GotDotNet. It implements an abstract factory pattern for data providers. It works with Oracle, but not, I think, with ODP.NET. It's extensible, though, so ODP.NET support could be added.
In addition the V2 of the .NET framework will have an abstract factory pattern for data providers built in.
On the particular question of ref cursors and Sql Server, here's what I do. My Oracle procedures which return result sets always return only one, and, by convention, the ref cursor parameter is the last one. Then I use a helper method like FillDataTable, or ExecuteReader to interface with the database. The application is bound the SqlServer definition of the procedure, but in the Oracle version of the helper function I simply add another parameter to the end of the command parameters to receive the ref cursor.
David

Similar Messages

  • Data Access Layer In BPM

    Hi,
    I am using WLPI. I need to define the data access layer. As workflows deal in
    XML and for JDBC calls I need value objects. I have few questions:
    Is there any proffered way of communication between BPM and database?
    Does BEA/Sun/BPM Users recommend entity beans for data access thru BPM?
    Do I have to write XML to value object and vice versa logic for each type of communication?
    Please recommend a standard approach.
    Thanks,
    Parag

    My questions are:
    Is it proper to use AI Adaptors for normal database storage? and is there any
    way to store the XML into its db representation? I was thinking of calling business
    operation from BPM, passing the xml and parsing it in session bean and make jdbc
    calls in ejb. Looks like a lot of effort. Hence I am curious to know other solutions
    Thanks,
    Parag
    "Dharnidhar Vemuri" <[email protected]> wrote:
    Hi,
    Ways that I can think of are
    - using Application Integration, specifically views (it also
    uses
    EJB)
    - EJB classes
    - a java class
    I didn't get u what u meant by XML to value object. Can u be in more
    detail.
    Thanks
    Dhar
    "Parag" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    I am using WLPI. I need to define the data access layer. As workflowsdeal
    in
    XML and for JDBC calls I need value objects. I have few questions:
    Is there any proffered way of communication between BPM and database?
    Does BEA/Sun/BPM Users recommend entity beans for data access thruBPM?
    Do I have to write XML to value object and vice versa logic for eachtype
    of communication?
    Please recommend a standard approach.
    Thanks,
    Parag

  • Oracle Data Access Layer - w/Enterprise Services

    I'm looking for an example Oracle Data Access layer incorporating Enterprise Services with at least a simple window form inserting and updating data tables.
    Can somepoint point me in the right direction?
    Thanks,
    Tony

    Hi Tony,
    I would recommed you hit some of the popular .Net Development sites on the Internet. For example, just googling on .Net Enterprise Services provides links where simple samples can be reviewed. These generic code samples can then be tweaked to include ODP code for data access. If your components or code will be enlisting in transactions with MTS, hence your class or aspx page is transactional, you will need to install the Oracle Services for MTS in addtion to the ODP driver.
    HTH
    Jenny

  • Flex/Coldfusion data access layer

    Hi
    I'm researching ways to achieve a data access layer using flex/coldfusion.
    Currently it seems that I would need a RemoteObject on each flex component that will access ColdFusion (a cfc that will access a database).
    I'm not sure if it's possible to have a data access class, which will contain a single RemoteObject, and somehow I will be able to request data from a component and somehow retrieve it again. I have the feeling I'd have to dispatch events at the component level, and also include the result handling here too, which I'm not sure is ideal. I haven't been able to decide on a strategy yet.
    So far I've only found articles describing a need to have a layered structure when building a large data-centric application, however no examples of how this is actually acheived.
    If anyone has seen any examples of this please could you share them here.
    Thanks.

    I am looking for something similar, but I am not too
    sure how it would work.
    I have tried developing one myself, using the
    underlying interface classes, but I am unsure how to
    overcome the differences between SQL Server and
    Oracle when returning result sets. SQL Server is
    happy to return a DataSet from a stored procedure,
    but Oracle must be given a Ref Cursor variable
    parameter for each DataTable returned.
    This means that the calling code must differ between
    SQL Server and Oracle.
    If anyone can suggest a neat way to get over this,
    I'd appreciate it.
    Check out the DAABv3 from GotDotNet. It implements an abstract factory pattern for data providers. It works with Oracle, but not, I think, with ODP.NET. It's extensible, though, so ODP.NET support could be added.
    In addition the V2 of the .NET framework will have an abstract factory pattern for data providers built in.
    On the particular question of ref cursors and Sql Server, here's what I do. My Oracle procedures which return result sets always return only one, and, by convention, the ref cursor parameter is the last one. Then I use a helper method like FillDataTable, or ExecuteReader to interface with the database. The application is bound the SqlServer definition of the procedure, but in the Oracle version of the helper function I simply add another parameter to the end of the command parameters to receive the ref cursor.
    David

  • Dynamic query with Data Access Layer

    I have a program that has a multiselect box (JSP form) to select certifications and then search to see which employee may have them.
    I have no issues when searching by only one, but if I select multiple certifications from the multiselect box, it doesn't work. I've tried and tried and I can't seem to figure this out.
    Below is the code for returning employees that match what certifications were chosen. Again, it works fine if only 1 was selected. I wish for it to return only the employees that match all selections.
    the arguments passed to the DataAccess Layer are an array of certification ID's and the size variable is how many certifications were chosen. The for loop is supposed to dynamically append to the end of the query an extra "AND" sql operator to match up. The 3 tables selected in the query are Employee (a list of employees and ID's), Certificates (a list of possible certificates and their ID's) and Employee_Certificate (a table that matches which employees have which certificates).
    What am I doing wrong?
    public List certSearch(int cert[], int size) throws Exception{
             // connection instance
             ArrayList list = new ArrayList();
             Connection connection=null;
             PreparedStatement pstatement = null;
             try
                    list.clear();
                    StringBuffer queryString = new StringBuffer("SELECT * from EMPLOYEE, EMPLOYEE_CERTIFICATE, CERTIFICATE" +
                                         " WHERE employee_certificate.employee_id = employee.employee_id " +
                                         "AND certificate.certificate_id = employee_certificate.certificate_id ");
                    for (int incr = 0; incr < size; incr++){
                        queryString.append("AND certificate.certificate_id = " + cert[incr] + " ");
                    String query;
                    query = queryString.toString();
                    // Send query to database and store results.
                    Class.forName(Driver);
                    //Establish network connection to the db
                    connection = (Connection) DriverManager.getConnection(url, username, password);
                    pstatement = (PreparedStatement) connection.prepareStatement(query);
                    ResultSet rs = pstatement.executeQuery();
                    while (rs.next())
                        Employee emp = new Employee();
                        int empID=Integer.parseInt(rs.getString("employee_id"));
                        String first=rs.getString("first_name");
                        String last=rs.getString("last_name");
                        emp.setID(empID);
                        emp.setFirstName(first);
                        emp.setLastName(last);
                        list.add(emp);
               catch(Exception readerr)
                    System.err.println("Error reading  "+ readerr);
               finally
                try
                    // close the connection so it can be returned to the
                    // connection pool then return the SubjectCounselor instance
                    connection.close();
                catch (SQLException ex)
                       System.err.println("Error reading employee data: " + ex);
                return list;
        }Edited by: Snadinator on Aug 1, 2009 1:35 PM

    You don't get it.
    This should work :
    public List certSearch(int cert[], int size) throws Exception{
             // connection instance
             ArrayList list = new ArrayList();
             Connection connection=null;
             PreparedStatement pstatement = null;
             try
                    list.clear();
                    String query = buildQuery(cert);
                    // Send query to database and store results.
                    Class.forName(Driver);
                    //Establish network connection to the db
                    connection = (Connection) DriverManager.getConnection(url, username, password);
                    pstatement = (PreparedStatement) connection.prepareStatement(query);
                    ResultSet rs = pstatement.executeQuery();
                    while (rs.next())
                        Employee emp = new Employee();
                        int empID=Integer.parseInt(rs.getString("employee_id"));
                        String first=rs.getString("first_name");
                        String last=rs.getString("last_name");
                        emp.setID(empID);
                        emp.setFirstName(first);
                        emp.setLastName(last);
                        list.add(emp);
               catch(Exception readerr)
                    System.err.println("Error reading  "+ readerr);
               finally
                try
                    // close the connection so it can be returned to the
                    // connection pool then return the SubjectCounselor instance
                    connection.close();
                catch (SQLException ex)
                       System.err.println("Error reading employee data: " + ex);
                return list;
        // I used the MySQL syntax; if it doesn't work : just enclose the values by single quotes
        private String buildQuery(int[] cert) {
            StringBuffer queryString = new StringBuffer("SELECT * from EMPLOYEE, EMPLOYEE_CERTIFICATE, CERTIFICATE" +
                    " WHERE employee_certificate.employee_id = employee.employee_id " +
                    "AND certificate.certificate_id = employee_certificate.certificate_id " +
                    "AND certificate.certificate_id IN ( ");
            queryString.append(cert[0]);
            for (int i = 1; i < cert.length; i++) {
                queryString.append(" ,");
                queryString.append(cert);
    queryString.append(" )");
    return queryString.toString();

  • Ideally speaking where would view a CMP -- Data Access or Business Layer

    I know this may be a very stupid question to ask here.
    But shoud one view all entity objects as data access objects or
    business objects. was just making a diagram to logically seperate
    the layers and kind off had some doubts and discussion with
    various viewpoints.

    the argument that I heard infavour of having CMP entity beans
    in the data access layer was that the just represent database rows and ideally they should do no more except validation so they should not be part of the business layer.
    But a part of me tells me that there is something really important I am missing
    which makes them a part of the business layer.... maybe someting I heard that
    I have forgotten... but then again maybe there is nothing more to it :-|

  • Failed to open the console and System Center Data Access Service wont start - SCOM 2012

    Log Name: Operations Manager
    Source: Data AccessLayer
    Event ID: 33333
    Data Access Layer rejected retry on SqlError:
     Request: ManagementGroupInfo
     Class: 16
     Number: 208
     Message: Invalid object name 'dbo.__MOMManagementGroupInfo__'.
    =============================================================
    Log Name: Operations Manager
    Source: OpsMgr SDK Service
    Event ID: 26380
    The System Center Data Access service failed due to an unhandled exception.  
    The service will attempt to restart.
    Exception:
    Microsoft.EnterpriseManagement.Common.SdkServiceNotInitializedException: The Data Access service has not yet initialized. Please try again.
       at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.get_Container()
       at Microsoft.EnterpriseManagement.Mom.Sdk.Service.SdkSubService.SdkChannel.Start()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    =============================================================
    Failed to connect to server ' xxxxx'
    Date: 16/09/2013 20:36:16
    Application: Operations Manager
    Application Version: 7.0.8560.0
    Severity: Error
    Message: Failed to connect to server 'xxxxxx'
    Microsoft.EnterpriseManagement.Common.ServiceNotRunningException: The Data Access service is either not running or not yet initialized. Check the event log for more information. ---> System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://xxxxx:5724/DispatcherService.
    The connection attempt lasted for a time span of 00:00:02.0020300. TCP error code 10061: No connection could be made because the target machine actively refused it xxx.xxx.xxx.xxx:5724.  ---> System.Net.Sockets.SocketException: No connection could
    be made because the target machine actively refused it xxx.xxx.xxx.xxx:5724
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
       at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.EnterpriseManagement.Common.Internal.IDispatcherService.Connect(SdkClientConnectionOptions connectionOptions)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.Initialize(EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.CreateEndpoint[T](EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       --- End of inner exception stack trace ---
       at Microsoft.EnterpriseManagement.Common.Internal.ExceptionHandlers.HandleChannelExceptions(Exception ex)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.CreateEndpoint[T](EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.ConstructEnterpriseManagementGroupInternal[T,P](EnterpriseManagementConnectionSettings connectionSettings, ClientDataAccessCore clientCallback)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.RetrieveEnterpriseManagementGroupInternal[T,P](EnterpriseManagementConnectionSettings connectionSettings, ClientDataAccessCore callbackDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.Connect[T,P](EnterpriseManagementConnectionSettings connectionSettings, ClientDataAccessCore callbackDispatcherService)
       at Microsoft.EnterpriseManagement.ManagementGroup.InternalInitialize(EnterpriseManagementConnectionSettings connectionSettings, ManagementGroupInternal internals)
       at Microsoft.EnterpriseManagement.Mom.Internal.UI.Common.ManagementGroupSessionManager.Connect(String server)
       at Microsoft.EnterpriseManagement.Monitoring.Console.Internal.ConsoleWindowBase.TryConnectToManagementGroupJob(Object sender, ConsoleJobEventArgs args)
    System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://xxxxx:5724/DispatcherService. The connection attempt lasted for a time span of 00:00:02.0020300. TCP error code 10061: No connection could be made because the target machine actively
    refused it xxx.xxx.xxx.xxx:5724.  ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it xxx.xxx.xxx.xxx:5724
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
       at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.EnterpriseManagement.Common.Internal.IDispatcherService.Connect(SdkClientConnectionOptions connectionOptions)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.Initialize(EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.CreateEndpoint[T](EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
    System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it xxx.xxx.xxx.xxx:5724
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
    =============================================================
    Log Name: Operations Manager
    Source: OpsMgr Root Connector
    Event ID: 28001
    The Root connector received an exception from the Config Service on StateSyncRequest:
    System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.
    Server stack trace:
       at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)
       at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)
       at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
       at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.EnterpriseManagement.Mom.Internal.IConfigService.OnStateSyncRequest(Guid source, UInt64 messageIdentifier, String cookie)
       at Microsoft.Mom.Connectors.Root.RootConnector.OnStateSyncRequest(Guid source, UInt64 messageIdentifier, String cookie)
    ================================================================
    Log Name: Operations Manager
    Source: OpsMgr Management Configuration
    Event ID: 29105
     The management group is not yet fully upgraded. OpsMgr Management Configuration Service will idle until upgrade is completed.
     Operations Manager database version: 1.0.0.0
     Minimum required version: 7.0.0.0

    Yes, i change the credentials, but doesnt work.
    Yes, i put the events in the
    main question!
    Events Logs:
    =======================================================
    Log Name: Operations Manager
    Source: Data AccessLayer
    Event ID: 33333
    Data Access Layer rejected retry on SqlError:
     Request: ManagementGroupInfo
     Class: 16
     Number: 208
     Message: Invalid object name 'dbo.__MOMManagementGroupInfo__'.
    =======================================================
    Log Name: Operations Manager
    Source: OpsMgr SDK Service
    Event ID: 26380
    The System Center Data Access service failed due to an unhandled exception.  
    The service will attempt to restart.
    Exception:
    Microsoft.EnterpriseManagement.Common.SdkServiceNotInitializedException: The Data Access service has not yet initialized. Please try again.
       at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.get_Container()
       at Microsoft.EnterpriseManagement.Mom.Sdk.Service.SdkSubService.SdkChannel.Start()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    =======================================================
    Log Name: Operations Manager
    Source: OpsMgr Root Connector
    Event ID: 28001
    The Root connector received an exception from the Config Service on StateSyncRequest:
    System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.
    Server stack trace:
       at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)
       at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)
       at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
       at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.EnterpriseManagement.Mom.Internal.IConfigService.OnStateSyncRequest(Guid source, UInt64 messageIdentifier, String cookie)
       at Microsoft.Mom.Connectors.Root.RootConnector.OnStateSyncRequest(Guid source, UInt64 messageIdentifier, String cookie)
    =======================================================
    Log Name: Operations Manager
    Source: OpsMgr Management Configuration
    Event ID: 29105
     The management group is not yet fully upgraded. OpsMgr Management Configuration Service will idle until upgrade is completed.
     Operations Manager database version: 1.0.0.0
     Minimum required version: 7.0.0.0

  • Database access code in objects constructor, or in data access object

    Given an object that is stored in a database, is it better to have the database access code in a constructor method, or a data access layer object? E.g. I have a Person class
    public class Person{
    int Id;
    String name;
    int age;
    }When I want to read a person's details from the database, I could use a constructor something like this:
    public Person(int id){
    Connection con = getDatabaseConnection();
    ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
    rs.next();
    this.name = rs.getString(1);
    this.age=rs.getInt(2);
    }Or I could use a method in a data access object :
    public Person getPerson(int id){
    Person p = new Person();
    Connection con = getDatabaseConnection();
    ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
    rs.next();
    p.setName(rs.getString(1));
    p.setAge(rs.getInt(2));
    return p;
    }It seems to me that the constructor approach has two advantages
    (1) the SQL code is kept in the relevant class (so if I want to add a field to Person, I only have to make changes to the Person class)
    (2) I don't have to have a setter method for each field
    Is one or other of these ways generally recognized as 'best practise'?

    malcolmmc wrote:
    But then, on the other hand, everytime a Person gains a new field that's two places you have to change it. if the persistence interface is written in terms of the object and uses ORM, I don't have to touch the implementation. all i have to do is update the object, the database, and the mapping - just like you and your home brew ORM.
    besides, so what? i'd fear the resource leak, bad layering, more difficult testing more.
    Actually lately I've used annotations to label setters with database field names and run a simple home brew ORM to convert rows into objects even when not using a more complex persistence manager.home brew ORM? why is that necessary when you can choose from hibernate, ibatis, jdo, jpa, etc.? that's just nuts.
    %

  • Urgent: how to really seperate business logic class from data access class

    Hello,
    I've this problem here on my hand and i really need help urgently. so please allow me to thank anyone who replies to this thread =)
    Before i go any futhur, let me present a scenario. this will help make my question clearer.
    "A user choose to view his account information"
    here, i've attempted to do the following. i've tried to seperate my application into 3 layers, the GUI layer, the business logic layer, and the data access layer.
    classically, the GUI layer only knows which object it should invoke, for example in the case above, the GUI would instantiate an Account object and prob the displayAcctInfo method of the Account object.
    here is how my Account class looks like:
    public class Account
    private acctNo;
    private userid;
    private password;
    private Customer acctOwner;
    the way this class is being modelled is that there is a handle to a customer object.
    that being the case, when i want to retrieve back account information, how do i go about retrieveing the information on the customer? should my data access class have knowledge on how the customer is being programmed? ie setName, getName, setAge, getAge all these methods etc? if not, how do i restore the state of the Customer object nested inside?
    is there a better way to archieve the solution to my problem above? i would appriciate it for any help rendered =)
    Yours sincerely,
    Javier

    public class AccountThat looks like a business layer object to me.
    In a large application the GUI probably shouldn't ever touch business objects. It makes requests to the business layer for specific information. For example you might have a class called CustomerAccountSummary - the data for that might come entirely from the Account object or it might come from Account and Customer.
    When the GUI requests information it receives it as a 'primitive' - which is a class that has no behaviour (methods), just data. This keeps the interface between the GUI and business layer simple and makes it easier to maintain.
    When using a primitive there are four operations: query, create, update and delete.
    For a query the gui sets only the attributes in the primitive that will be specifically queried for (or a specialized primitive can be created for this.) The result of a query is either a single primitive or a collection of primitives. Each primitive will have all the attributes defined.
    For a create all of the attributes are set. The gui calls a method and passes the primtive.
    For an update, usually all fields are defined although this can vary. The gui calls a method and passes the primitive.
    For a delete, only the 'key' fields are set (more can be but they are not used.) The gui calls a method and passes the primitive.
    Also keep in mind that a clean seperation is always an idealization. For example verify that duplicate records are not created is a business logic requirement (the database doesn't care.) However, it is much easier and more efficient to handle that rule in the database rather than in the business layer.

  • Data Access Manager

    Hi all
    I had to design a data access layer framework (yes, I DID suggest Hibernate at the time, duffy ;-)) and came up with a rather good solution, IMHO. As the data access should be generated by a tool, there's but one possibility : map one DTO per table and populate them in the DAO. That's how it was before I arrived and it won't change.
    Here is how it works :
    public interface DAO {
        // marker interface
    // DAO interface for table 'xxx'
    public interface XxxDAO extends DAO {
        public static final class Row {
            // column mappings to private java fields
            // full constructor
            // public getters & setters
        public Row get(/* primary key */);
        public Set<Row> select(/* index */);
        public int insert(Row row); // returns the serial if any
        public void update(/* primary key */, Row row);
        public void delete(Row row);
    }It is sufficient to explain my problem :
    1. there's no primary key in our tables (eeeeeeeeewwwww, I know, nobody listens to me)
    2. OTOH there may be multiple unique indices
    3. ... and of course many multiple non unique indices
    instead of creating getX(), getY(), ..., selectX(), selectY(), blablabla... methods with as many parameters as the respective index holds, I'd like to be able to do something like :
        public Row get(Key key); // any existing unique index
        public Set<Row> select(Index index); // any existing non unique index
        public int insert(Row row); // returns the serial if any
        public void update(Key key, Row row); // here 'key' would be the "main" unique index (I'll deal with that ;))
        public void delete(Row row);But as soon as I start to think about how to modify the SQL implementation, I'm quite stuck. How could the (SQL)DAO know which key it receives and then build the query in an appropriate way ? I can't give any SQL responsibility to the Key class since it's intended to remain technology-independent, and a factory sounds heavy and dodgy to me...
    Will I have to duplicate these get and select methods and give them unpronouncable names based on their index (indices can hold the same data types in the same order, unfortunately, that's why the Key/Index classes would have helped) ?
    Do I have to design generic Key and Index classes that can be used as DTO for any query constraints (like an array containing the index fields as Objects)... by doing so, I stop enforcing that XxxDAO should only receive XxxKey and XxxIndex...
    This problem is driving me mad, any help is welcome

    I'd like to open by saying whoever suggested you
    reduplicate the work of so many teams of people
    single handedly is a complete and total idiot and you
    should be sure you get paid for every minute of your
    wasted time and futile effort.I sure will... ;-)
    >
    You need to generate SQL for everything. YOU are not
    the one that gets to act like the database is
    abstract, YOU are the one that gets to make it so
    others can act that way..right
    >
    The key can most certainly have SQL. What you are
    creating is your internal DAO, not what the end user
    will think of as his DAO. He does not get to see
    your key or what it really does. that's not how I was seeing things actually. I wanted to create the Key and Index class in order to facilitate the coder's life :
    * unique index => Row get(Key) method
    * non unique index => Set<Row> select(Index) method
    As I want to "abstract myself away" from SQL (the data might come from a Web Service, flat files, or even Hibernate or any other O/R mapping tool), my (top) key (interface/class) shouldn't hold any implementation-specific code
    so like with JDO
    you can create your key based on the metadata of the
    end user. that is how you know the type of key and
    whatnot.
    Why don't you tell that bonehead company to just
    assign you to hibernate or jpox and allow you to work
    there solving the same problem and getting much
    faster results for us all, than this...
    Facisinating.actually, at the time when the decision was made, Hibernate was (slightly) incompatible with older versions of the DBMS that's installed at our customers'
    I bet it's not the case anymore now and we've spent money for nothing, but I'm not the one who gets to make the decisions ;-)

  • Bandwidth from Access Layer to Distribution Layer

    Folks:
    I am currently on Chapter 12 of “CCNP Switching 642-813, Official Certification Guide” ISBN: 978-1-58720-243-8. I am currently not grasping the three layers entirely, and I was hoping someone could offer insight in a different way.
    I believe I understand, that switches in the Access-Layer can be layer2 devices (2950, etc), and devices in the Distribution Layer should be Multilayer devices such as Layer-3 switches (3750) and inter-vlan routing takes place at the Distribution layer. But what I do not understand – how does one account for bandwidth and traffic from the Access Layer switches to the Distribution Switches?
    Let use a 24 port 2950 switch located at the Access-Layer. If everyone was online and communicating, the total traffic for the switch would be 4.8 Gbps. The latter is due to each port providing 100 Mbps but in Full-Duplex, so (100*2)*24. So, how does an engineer spec out the required uplink ports from the Access Layer to the Distribution?
    I am sure this is easy; however, I am not getting the concepts. Any insight is great.

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    As noted by Peter, edge hosts don't generally all concurrently push/pull their full port bandwidth for substained periods.  However, host bandwidth usage often varies much by "kind" of host.  For example, many server hosts are "busier" than most user hosts, so when designing networks you normally design for lower oversubscription ratios for server hosts than for user hosts.  Old rule-of-thumbs ratios suggest oversubscription ratios of about 8:1 to 4:1 for servers, and about 48:1 to 24:1 for users.
    Keep in mind that oversubscription ratios can be "skewed" by what the host is doing, i.e. not all server or user hosts have similar bandwidth demands.  For example, your primary mail server or primary file server might be much "busier" than other server hosts.  Likewise, some user hosts might be much "busier", for example, years ago I supported a LAN segment of CADD (20) workstations which had more traffic on their local LAN than the (2,000 user) corporate backbone.

  • Object services - manual implementation of database access layer

    Hello,
    this is my first time with object services. I read a lot but can't find the information which I really need to implement my requirements.
    I have build a persistent class, clicked to "persistence", mapped my persistent attributes. I want to use a table-like attribute in my class, which contains references to another class. I added this attribute manually to the attribute list in the class builder. Consequently, GET and SET methods were generated automatically. Then I changed the generator settings by activating "manual implementation of database access layer".
    So, my first notice is - If I choose manual implementation a call of create_persistent-method will not work. Nothing will be inserted into the mapped data base table.
    Can anybody give me a example which shows how I can implement the database access layer manually? What do I have to do to write object attributes into data base table?
    Which methods do I have to enhance?
    Thanks a lot for any help in advance!
    Anne

    Thanks for your answer, but I would not be sure if you really got my problem.
    I really really read much stuff (including SAP help, sappress "object services in ABAP" by Assig, Fobbe, Niemitz, sappress "abap objects" by keller), I googled a lot. But I couldn't find detailed information about this manual implementation of database access which you can activate in persistence settings.
    This is the only extract out of SAP Help regarding this topic:
    "If you prefer to carry out a manual implementation of the database access layer, select  to change the generator settings and select the field of the same name. In this case you can implement your own database read routines, through which you can redefine the generated SET and GET methods for access to the database. This is particularly recommended if you want to improve performance by providing these routines with their own buffer mechanism. "
    And some information about so calles Structure mapping which means the same idea in my opinion
    "Structure Mapping
    In this case, you map ABAP Dictionary structures, rather than database tables or database views to persistent objects. The application developer must therefore program the type of persistent data storage in the appropriate methods of the class actor.
    You will need to map a structure (or structures) if you want a persistent object to contain table-like attributes. Database tables can only have flat structures, which prevents your mapping the object to a table in this case. You must still use structure mapping, even if you want to store the data in a different form u2013 such as in a file on the application server."
    I used the debugger to get the idea of the SAVE method. But I couldn't find the difference between manual and automatic implementation in the code.
    I tried to use implicit enhancement, but was not successful. Right now I am trying to redefine the SAVE method of the interface IF_OS_CA_SERVICE. But I can't believe that I have to implement the whole attribute-table-mapping on my own now. That can't be the idea of object service and their manual implementation. In my opinion it must be possible to use predefined algorithm to map business key etc. to corresponding table fields and to implement own ideas just for those table-like attributes..
    Or am I totally wrong with this thoughts?
    Thanks in advance!!
    Anne

  • 6500 or 4500 for the access layer

    I would like to get some input as to the best switch to use at the access layer. I am considering both the 6500 with a Supervisor 32 and the 4500 with a Supervisor 5. I am using the Sup 720 in the data center so staying with a single platform is appealing although the 4500 clearly appears to out perform the Sup 32.
    Does anyone have experience with the Supervisor 32? Any feedback would be much appreciated.

    Go with the 6500 with the Sup32. Cisco has a bundle with a chassis, Sup32, and a Fan for the reduced price.
    Few reasons the Sup32 is a better choice.. (engage your Local Cisco account team for a overview to compare architectures)
    Same Layer2 engine as the Sup720. This means you will receive the same Layer2 performance as the Sup720 would using classic line cards
    Modular IOS and the Same IOS as your core. This allows you to only have to test and maintain one code for the network
    Can upgrade to a Sup720 later if your needs change. (or the next version line cards as well without replacing chassis)
    higher density POE support in the 6500 chassis.
    Many more features are supported in Hardware on the Sup32 due to the PFC3B.
    Control Plane Policing. Hardware policiers
    Service module support
    Dont let PPS fool you on the spec sheets. Look at the architecture as a whole. The Sup V on the 4500 is a shared memory architecture and has a limited "punt path". The Sup32 has a 1Gbs punt path and the SupV is under 250k pps. The Sup V also does not have a dedicated L2 engine like the Sup32 does (PFC3B vs asic)
    Your profile also lists you as with a financial firm. With multicast in the equation, the 6500 is always the best bet. The Multicast features/policers support in hardware to insure reliability and low latency switching is a perfect fit for the Sup32/Sup720.
    With the Sup32 you can have the same reliability you have in the core. Also, the 6500 bundle cost comes to roughly the same cost as the 4500.

  • I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build.  The same call works fine when running on the device

    I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
    I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
    The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
    I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
    I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
    By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
    Anyone have an idea on other things to try to debug/resolve this?
    Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
    Thanks!

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • How can I disable data access on C1-01 ?

    I have a C1-01, for emergency use only.  Today it displayed an unsolicited "Download Failed", message, and sure enough, my paygo account had been emptied.  How can I prevent all data access, ie attempts to update firmware, internet access, etc?
    TIA, Richard
    Solved!
    Go to Solution.

    easiest way is to contact your network operator and ask them to disable your data plan and all internet access on your device. there are also a few miscellaneous settings in your phone, so you can try deleting access points if they are displayed in the Settings. i would check the phone Settings menu and the Web browser settings for items that you can turn off / disable.

Maybe you are looking for

  • How to diagnose performance problems?

    Hi all, I'm trying to run some basic performance tests of our app with Coherence, and I'm getting some pretty miserable results. I'm obviously missing something very basic about the configuration, but I can't figure out what it is. For our test app,

  • Array of CreditCard objects - PLEASE HELP!

    My situation is this: I need to create an array of CreditCard objects. The problem is that when I try to invoke the methods getName, getNumber, or getLimit, the compiler recognizes the array (cardholders) as a variable. My coding is this. for(int i=0

  • FI IDCO standard ALE configuration

    Hi all, I need some help on a solution to set up for FI doc ALe ditstribution using standard tools. The goal os is to send Acc doc from an R/3 to antoher R/3 system via trfc idoc, using standard messages, functions, ... The acc docs should be sent 1/

  • My Safari isn't responding and I keep getting the rainbow pinwheel. Why is this happening?

    I'll open Safari and go to my usual pages, however now when I open it and it's trying to load my homepage, it doesn't really load and then I get the rainbow pinwheel and it just does that until I get fed up and try to close the window. I have tried q

  • Employee responsible determination

    We have a partner determination procedure for sales orders. Within this procedure, the partner function "employee responsible" is determined with the access sequence "CH08: Organizational data: Employee of Responsible Organizational Unit". This is wo