Three-tier model howto

Hi... i�m newbie in Java.
I am supossed to create an application using three-tier model, i have made it using two-tier model.
Can anybody give me a hand with the code,
I need an example to start i can not fiugre this out.
The application needs to interact with a database.
I�ve heard that in the three-tier model you do not have to make the whole statement in one method, instead you have to create some utilitary classes in which each method returns data corresponding to a part of the query. How true is this?
Please i need some examples!
i am desperate.

To get you started have a look at the RMI and JDBC API's. These are basicly all you need for a 3 tier client server archtecture. There are plenty of resources/examples at www.java.sun.com.

Similar Messages

  • Three tier one-many issue

    I'm having difficulty with a one to many relationship in a three tier model.
    I am reading an object at the service layer and following an indirection to pull back a list of owned objects through a one to many, then passign it back to my web tier.
    To save the object I pass it back to my service layer, instantiate a uow, do uow.readObject(rmiCopy), then uow.deepMerge(rmiCopy), and commit.
    This always works if I insert or delete or even edit the related objects. But if I update a one-to-one relationship within the child object I get the exception below.
    I've left in the SQL because I don't understand why it is generated and think it may be part of the problem. Note that it is selecting crystal_id and is using crystal_id in the where clause as well. I suppose this suggests an error in my mapping but for the life of me I can't find it.
    Thanks,
    Mike
    5492,5,main]--#executeQuery(ReadObjectQuery(com.sgx.domain.cti.CryoContents))
    2004.06.11 09:51:45.441--ServerSession(19512411)--Thread[HttpRequestHandler-2680
    5492,5,main]--Connection(24797434)--SELECT t1.CRYSTAL_ID, t1.AMOUNT, t1.UOM, t1.
    SUBSTANCE_ID, t0.PH, t0.SMILE_STRING, t0.COMMENTS, t0.SOLUBILITY, t0.GRAMS_PER_5
    0ML, t0.SUBSTANCE_ID, t0.LIQUID_CLASS, t0.SUBSTANCE_NAME, t0.CAS, t0.SUBSTANCE_T
    YPE, t0.IS_CRYO, t0.TUBE_NUMBER, t0.CONCENTRATION, t0.UOM, t0.MOLECULAR_WEIGHT,
    t0.VENDOR FROM SGX.SUBSTANCES t0, SGX.CRYO_CONTENTS t1 WHERE (((t1.CRYSTAL_ID =
    ?) AND (t1.SUBSTANCE_ID = ?)) AND (t0.SUBSTANCE_ID = t1.SUBSTANCE_ID))
    bind => [3878, 134]
    2004.06.11 09:51:45.441--ServerSession(19512411)--Thread[HttpRequestHandler-2680
    5492,5,main]--#reconnecting to external connection pool
    2004.06.11 09:51:45.441--UnitOfWork(25134304)--Thread[HttpRequestHandler-2680549
    2,5,main]--#executeQuery(DoesExistQuery())
    2004.06.11 09:51:45.441--ClientSession(15515681)--Thread[HttpRequestHandler-2680
    5492,5,main]--#executeQuery(DoesExistQuery())
    2004.06.11 09:51:45.441--ServerSession(19512411)--Thread[HttpRequestHandler-2680
    5492,5,main]--Connection(25154336)--SELECT CRYSTAL_ID FROM SGX.CRYO_CONTENTS WHE
    RE ((CRYSTAL_ID = ?) AND (SUBSTANCE_ID = ?))
    bind => [3878, 134]
    2004.06.11 09:51:45.441--ServerSession(19512411)--Thread[HttpRequestHandler-2680
    5492,5,main]--#reconnecting to external connection pool
    2004.06.11 09:51:45.504--UnitOfWork(25134304)--Thread[HttpRequestHandler-2680549
    2,5,main]--#register(com.sgx.domain.cti.Substance@5a77b6)
    2004.06.11 09:51:45.519--UnitOfWork(25134304)--Thread[HttpRequestHandler-2680549
    2,5,main]--java.lang.NullPointerExceptionjava.lang.NullPointerException
    at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate
    (Unknown Source)
    at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(Unkn
    own Source)
    at oracle.toplink.internal.indirection.BasicIndirectionPolicy.cloneAttri
    bute(Unknown Source)
    at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(Unknown So
    urce)
    at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesF
    orClone(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(U
    nknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(Unkn
    own Source)
    at oracle.toplink.internal.sessions.MergeManager.registerObjectForMergeC
    loneIntoWorkingCopy(Unknown Source)
    at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneInto
    WorkingCopy(Unknown Source)
    at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown So
    urce)
    at oracle.toplink.mappings.CollectionMapping.mergeIntoObject(Unknown Sou
    rce)
    at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unk
    nown Source)
    at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneInto
    WorkingCopy(Unknown Source)
    at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown So
    urce)
    at oracle.toplink.publicinterface.UnitOfWork.mergeClone(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.deepMergeClone(Unknown Sour
    ce)
    at com.sgx.serviceLayer.cti.impl.CrystalsBean.saveCrystal(CrystalsBean.j
    ava:146)

    Okay, I wonder if someone could just explain the limitations of working with objects in a three-tier application.
    How extensively can I safely modify an object in the web tier and still have it merge successfully when I return a copy to the serviceLayer?
    Is it just that I have to be careful not to follow indirections or is there more to watch out for?
    Mike

  • 2 tier model or 3 tier model

    Which one is better for BC4J JClient application ? using 2 tier model or 3 tier model ?
    Thx,
    Ricky H.P.

    Ricky,
    it depends on your business case
    If you need to share business logic with other web applications or if the client PC is not as powerfuly as it should be, then using a three tier architecture is what I would recommend.
    If you are free to choose with dependecies then a two tier architecture is what I would prefer. However, if you need your application client to be able to run offline /stand alone) against a local database, then two tier is what you should do.
    My personal preference is to position JClient in a two tier architecture running on Java Web Start.
    Frank

  • Servlets in three tier Architecture

    Hi
    We plan to use a three tier architecture with
    Client --- Applet (JDK 1.2)
    Middle tier -- WebServer and servlets
    Database Server -- Oracle 8i
    Our application should have data entry for several (5 - 12 ) tabs each consisting of around 15 fields . A few Jtables will also be used .
    Arounf 5 to 10 validations or queries are required to be done with the database in the applet. Around 300 entries will be made by 12 different users in a day.
    Is it advisable to use the above architecture ?
    Is it required to use Enterprise JavaBeans ?
    Will the use of servlets bring down the performance?
    Overall is our architecture feasible for the requirement ?
    We will be greatfull to your suggestions
    Please also mail to [email protected]
    N.Suresh

    Hello,
    We plan to use a three tier architecture with
    Client --- Applet (JDK 1.2)
    Middle tier -- WebServer and servlets
    Database Server -- Oracle 8i
    Our application should have data entry for several (5 - 12 ) tabs each consisting of around 15 fields . A few Jtables will also >be used .
    Arounf 5 to 10 validations or queries are required to be done with the database in the applet. Around 300 entries will be made >by 12 different users in a day.Have you considered using Business Components for Java to develop your application? From what you have described about your application BC4J seems to be the ideal candidate.
    Is it advisable to use the above architecture ?I see not limitation with your architecture. The only thing to keep in mind is that you should use applets only if you absolutely need to. Overall development and maintenance is much easier if you are just using servlets and JSPs.
    Is it required to use Enterprise JavaBeans ?See below.
    Will the use of servlets bring down the performance? No.
    Overall is our architecture feasible for the requirement ?If you had not needed applets then I'd have recommended the following:
    Scenario #1
    Client --- Browser
    Presentation Server -- Standard WebServer(Apache,OAS etc) running Servlets, JSPs talking to BC4J classes available on the local classpath
    Database Server -- Any Oracle Database
    Simplicity and ease of maintenance are some of the benefits of the above model. The limitation in the above scenario is that you cannot have a thin remote client(Java application or applet).
    If you want a remote client then I'd recommend:
    Scenario #2
    Client --- Browser|Applet (if you know you have a small number of users then you can go for a client side Application too)
    Presentation Server -- Standard WebServer(Apache,OAS etc) running Servlets, JSPs
    Application Server -- Standard AppServer (VisiBroker|OAS|JServer) running BC4J components as EJB session beans or CORBA server objects
    Database Server -- Any Oracle Database
    In this scenario the servlets|JSPs will be going over IIOP to talk to the application server. On the client side, the BC4J framework ensures that the network traffic is minimized and also the client side Java application or applet is as thin as it can be.
    Whether you go with scenario#1 or scenario#2 the cool thing about using BC4J is that you have to write your business logic only once and then you can deploy it in multiple platforms(local,EJB,CORBA) and access it from different clients(JSP,Servlets,Java,XML...) without modifying your business logic.
    Hope this helps.
    Please let me know if you have any questions.
    Regards,
    Arun
    null

  • Reporting services in three tier SharePoint 2013 environment

    Hi,
    I am trying to integrate SQL Server 2012SP1 Reporting Services in a three tier SharePoint 2013 environment, but it seems it is not succesful.
    The setup is as following:
    SRV1: SQL Server with content, config,... and the Reporting Service databases.
    SRV2: SharePoint 2013 Application server & Central Administration
    SRV3: SharePoint Web Front with SharePoint sites
    All application pools are started with domain accounts on SRV2 & 3
    When opening the Central Administration site, the Reporting Services Service Application and its Proxy is created and configured. On SRV2 the Application exists in the application pool in IIS, but it does not appear in the SRV3. Should it be created manualluy?
    In Central Administration, when opening the site settings the Reporting Services section is created, but when opening the Site Settings for the root site the section shows variables:
    $Resources:ReportServerResources,ReportServerSiteSettingsGroupTitle;
    $Resources:ReportServerResources,ScheduleList;
    $Resources:ReportServerResources,SiteLevelSettings;
    $Resources:ReportServerResources,ManageSiteDataAlerts;
    I believe i need some help here.
    Thanks in advance.
    Best regards,
    J

    Hi J-S,
    Generally, the issue occurs if you are in the Windows Powershell instead of the SharePoint Management Shell or the Reporting Services - SharePoint mode feature is not installed. So, please double check you are using the SharePoint Management Shell or install
    the Add-in by installing the rssharepoint.msi instead. Here is the download link:
    http://www.microsoft.com/en-us/download/details.aspx?id=35583
    If it is not the issue, please install the Reporting Services - SharePoint mode from the SQL Server 2012 installation media.
    Reference:
    http://msdn.microsoft.com/en-us/library/ms144289.aspx#bkmk_cmdlets_not_recognized
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Three tier (mod pl/sql) vs. two tier (PL/SQL Gateway)

    I've been using 10g Database and 10g application server on separate servers for some time now.
    Going the two tier (11g) route has some attractions, but what are the disadvantages?
    The Oracle documentation I've seen says very little on making the decision, giving benefits as:
    Ease of configuration
    Included in the database
    No separate server installation
    - but no negatives.
    Does anyone have any real live experience of comparing the two options?
    I'm inclined to believe that three tier might have more tuning flexibility, better performance if each tier is on a different server. Maybe worse than two tier if on one server, assuming two tier eliminates communication overheads..
    Does pl/sql gateway have the caching ability of Apache/mod pl/sql - I assume not? - that could make a big difference.
    Any thoughts would be welcome...

    There are several key performance advantages of OHS over EPG. I'm working a lot with the EPG right now and pushing the XDB team to add several of these features (maybe in 11.2, possible backport, but don't count on it). I used recommendations from the yslow Firefox add-in to do some performance tuning. Here's there list of Best Practices:
    http://developer.yahoo.com/performance/rules.html
    - EPG does not add an "Expires" header. So, lets say you have 25 images in your page template, and none of them change. Each page view will still request those 25 images. They use etags, so you don't have to download the images, but your browser still makes the requests which is quite slow. From my testing, pages could be up to 4 times slower with the EPG with a pretty standard template. The XDB team is aware of this and working hard to resolve it.
    - EPG does not support gzip. This is another HUGE performance hit.
    Keep in mind you can't test any of those issue with debug mode in APEX, you really need to use a browser plugin such as Firebug + ySlow. The render speed from APEX's point of view will be the same, no matter what HTTP server you use.
    The other big on is mod_rewrite support. There is no way easily create friendly URLs for your apps. Another thing to consider is that a number of Identity Management systems, such as Oracle Access Manager (OAM) work by installing an Apache Module or in the case of IIS, some type of plugin (forget what they call it). There is no concept of this in EPG.
    IMHO, it's convenient for laptops, but I would never use it for production unless you needed some feature that it exposes, such as WebDav or FTP access to the XDB repository...
    Tyler

  • Issue with form based Authentication in three tier sharepoint 2013 environment.

    Hi,
    We are facing issue with form based Authentication in three tier environment.
    We are able to add users to the database and in SharePoint.
    But we are not able to login with created users.
    In single tier everything working fine
    Please help , Its urgent ... Thanks in advance.
    Regards,
    Hari
    Regards, Hari

    if the environments match, then it sounds like a kerberos double-hop issue
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • WPF How can I implement the INotifyPropertyChanged in a Three-tier architecture?

    I am a student and I am confused on using the INotifyPropertyChanged in a three-tier style of coding. Can you guys help me a bit with these?
    I have a solution named MetroAppProject. It is composed of four projects (I omitted the using clauses and references, just imagine they are there and are working fine):
    1. MetroApp.BluePrints - a class library composed of the classes in my sql db
    An example of my class
    namespace MetroApp.BluePrints
        public partial class Patient
            public long Id { get; set; }
            public string PatientNumber { get; set; }
            public string LastName { get; set; }
            public string FirstName { get; set; }
            public string MiddleName { get; set; }        
            public string AddressLine1 { get; set; }
            public Nullable<short> CityId { get; set; }
    public string CityName { get; set; }
            public Nullable<short> ProvinceId { get; set; }
    public string ProvinceName { get; set; }        
    Then the second project:
    2. MetroApp.DataAccess = a class library composed of methods that calls my sql procedures. I used the SqlHelper class which contains the connection strings and other stuffs.
    example class
    namespace MetroApp.DataAccess
        public class PatientDb
    public Patient Retrieve(PatientParams parameters)
                SqlCommand command = new SqlCommand();
                Patient singItem = new Patient();
                command.CommandText = "RetrievePatients";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
                DataTable dt = SqlHelper.GetData(command);
                if (dt.Rows.Count > 0)
                    DataRow row = dt.Rows[0];
                    singItem.Id = TDefaultValue.GetInt(row["Id"].ToString());
                    singItem.PatientNumber = TDefaultValue.GetString(row["PatientNumber"].ToString());
                    singItem.LastName = TDefaultValue.GetString(row["LastName"].ToString());
                    singItem.FirstName = TDefaultValue.GetString(row["FirstName"].ToString());
                    singItem.MiddleName = TDefaultValue.GetString(row["MiddleName"].ToString());
                    singItem.AddressLine1 = TDefaultValue.GetString(row["AddressLine1"].ToString());
                    singItem.CityId = TDefaultValue.GetShort(row["CityId"].ToString());
                    singItem.CityName = TDefaultValue.GetString(row["CityName"].ToString());
                    singItem.ProvinceId = TDefaultValue.GetShort(row["ProvinceId"].ToString());
                    singItem.ProvinceName = TDefaultValue.GetString(row["ProvinceName"].ToString());
                return singItem;
            public List<Patient> RetrieveMany(PatientParams parameters)
                var items = new List<Patient>();
                var command = new SqlCommand();
                command.CommandText = "RetrievePatients";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@PatientNumber", parameters.PatientNumber).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@LastName", parameters.LastName).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@FirstName", parameters.FirstName).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@MiddleName", parameters.MiddleName).Direction = ParameterDirection.Input;            
                command.Parameters.AddWithValue("@CityId", parameters.CityId).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@ProvinceId", parameters.ProvinceId).Direction = ParameterDirection.Input;
                DataTable dt = SqlHelper.GetData(command);
                foreach (DataRow row in dt.Rows)
                    var item = new Patient();
                    item.Id = TDefaultValue.GetLong(row["Id"].ToString());
                    item.PatientNumber = (row["PatientNumber"].ToString());
                    item.LastName = (row["LastName"].ToString());
                    item.FirstName = (row["FirstName"].ToString());
                    item.MiddleName = (row["MiddleName"].ToString());                
                    item.AddressLine1 = (row["AddressLine1"].ToString());
                    item.CityId = (short)row["CityId"].ToString();
                    item.CityName = (row["CityName"].ToString());
                    item.ProvinceId = (short)row["ProvinceId"].ToString();
                    item.ProvinceName = (row["ProvinceName"].ToString());
                    items.Add(item);
                return items;
            public bool Insert(Patient entity, int userId, ref bool doesExist)
                var command = new SqlCommand();
                try
                    command.CommandText = "AddPatient";
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
    command.Parameters.AddWithValue("@Id", entity.Id).Direction = ParameterDirection.Input;
                    command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
                    int result = SqlHelper.ExecuteNonQuery(command);
                    doesExist = (bool)(command.Parameters["@DoesExist"].Value);
                    entity.Id = (int)(command.Parameters["@Id"].Value);
                    if (result == 0 || doesExist)
                        return false;
                    return true;
                catch (Exception)
                    return false;
            public bool Update(Patient entity, int userId, ref bool doesExist)
                var command = new SqlCommand();
                try
                    command.CommandText = "EditPatient";
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
    command.Parameters.AddWithValue("@Id", SqlDbType.Int).Direction = ParameterDirection.Output;
                    command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
    doesExist = (bool)(command.Parameters["@DoesExist"].Value);
                    int result = SqlHelper.ExecuteNonQuery(command);
                    if (result == 0 || doesExist)
                        return false;
                    return true;
                catch (Exception)
                    return false;
    Then a business logic
    3. MetroApp.BusinessLogic = class libray for calling the methods from DataAccess
    namespace MetroApp.BusinessLogic
        public class PatientMgr
            #region Fields
            private readonly PatientDb _db;
            #endregion
            #region Properties
            public Patient Entity { get; set; }
            public List<Patient> EntityList { get; set; }
            public PatientParams Parameters { get; set; }
            #endregion
            #region Constructors
            public PatientMgr()
                _db = new PatientDb();
                Entity = new Patient();
                EntityList = new List<Patient>();
                Parameters = new PatientParams();
            #endregion
            #region Methods
    public Patient Retrieve(PatientParams parameters)
                return _db.Retrieve(parameters);
            public List<Patient> RetrieveMany(PatientParams parameters)
                return _db.RetrieveMany(parameters);
            public bool Insert(Patient entity, int userId, ref bool doesExist)
                return _db.Insert(entity, userId, ref doesExist);
            public bool Update(Patient entity, int userId, ref bool doesExist)
                return _db.Update(entity, userId, ref doesExist);
            #endregion
    Then the last one, the WPF GUI
    <UserControl x:Class="MetroDentProject.Pages.PatientDetailsPage"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:dims="clr-namespace:MetroAppProject.UserCons"
                 mc:Ignorable="d" 
                 d:DesignHeight="720" d:DesignWidth="1280">
        <Grid x:Name="MainGrid" >
            <Grid.RowDefinitions>
                <RowDefinition  Height="40"/>
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <GroupBox Grid.Column="0" Grid.Row="1" Grid.RowSpan="7" x:Name="DetailsGroupBox" Header="Patient Details" >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Id: " Grid.Column="1" Grid.Row="0" Visibility="Collapsed"/>
                    <TextBox x:Name="IdTextBox" Grid.Column="1" Grid.Row="1" Visibility="Collapsed"/>
                    <TextBlock x:Name="PatientNumberTextBlock" Text="Patient Number: " Grid.Column="0" Grid.Row="0" />
                    <TextBox x:Name="PatientNumberTextBox" Grid.Column="1" Grid.Row="0" IsReadOnly="True" IsReadOnlyCaretVisible="True"/>
                    <TextBlock Text="Last Name: " Grid.Column="0" Grid.Row="1" />
                    <TextBox x:Name="LastNameTextBox" Grid.Column="1" Grid.Row="1" />
                    <TextBlock Text="First Name: " Grid.Column="0" Grid.Row="2" />
                    <TextBox x:Name="FirstNameTextBox" Grid.Column="1" Grid.Row="2" />
                    <TextBlock Text="Middle Name: " Grid.Column="0" Grid.Row="3" />
                    <TextBox x:Name="MiddleNameTextBox" Grid.Column="1" Grid.Row="3" />
                </Grid>
            </GroupBox>
            <GroupBox x:Name="ContactDetailsGroupBox" Header="Contact Details" Grid.Column="1" Grid.Row="1" Grid.RowSpan="7">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Address: " Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" />
                    <TextBlock Text="City: " Grid.Column="0" Grid.Row="2" />
                    <TextBlock Text="Province: " Grid.Column="0" Grid.Row="3"/>
                    <TextBox x:Name="AddressTextBox" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
                             TextWrapping="Wrap"
                             AcceptsReturn="True"
                             VerticalScrollBarVisibility="Auto"
                             />
                    <ComboBox x:Name="CitiesComboBox"  Grid.Column="1" Grid.Row="2"  />
                    <ComboBox x:Name="ProvincesComboBox"  Grid.Column="1" Grid.Row="3" />
                </Grid>
            </GroupBox>
            <dims:FunctionButtonsControl x:Name="FunctionButtonsCon" Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="2"
                                         ExecuteClick="FunctionButtonsCon_OnExecuteClick"
                                         UndoClick="FunctionButtonsCon_OnUndoClick"
                                         BackClick="FunctionButtonsCon_OnBackClick"
                                         DeleteClick="FunctionButtonsCon_OnDeleteClick"
                                         />
        </Grid>
    </UserControl>
    I apologize for the long post. As you can see, I don't use binding. Binding requires me to use INotifyPropertyChanged interface which I am not familiar. Can you at least make my project to implement the INotifypropertyChanged?
    Here is my sample code for the WPF page:
    public partial class PatientDetailsPage 
            readonly PatientMgr itemMgr = new PatientMgr();       
            public PatientParams CurrentPar = new PatientParams(); // for undoActionType _action = ActionType.Insert; // this is an enum from another project, ActionType.Insert, ActionType.Update
            public ActionType Action
                get { return _action; }
                set { _action = value; }
            public PatientDetailsPage()
                InitializeComponent();
                BindComboBoxes();
            #region Methods
            public void OnFragmentNavigation(FragmentNavigationEventArgs e)
            public void OnNavigatedFrom(NavigationEventArgs e)
            public void OnNavigatedTo(NavigationEventArgs e)
            {            Setup();
            public void OnNavigatingFrom(NavigatingCancelEventArgs e)
            public Patient GetPageEntity()
                Patient setEntity = new Patient();
                setEntity.Id = (long)IdTextBox.Text;
                setEntity.PatientNumber = PatientNumberTextBox.Text;
                setEntity.LastName = LastNameTextBox.Text;
                setEntity.FirstName = FirstNameTextBox.Text;
                setEntity.MiddleName = MiddleNameTextBox.Text;
                setEntity.AddressLine1 = AddressTextBox.Text;
                setEntity.CityId = (short)CitiesComboBox.SelectedValue);
                setEntity.ProvinceId = (short)ProvincesComboBox.SelectedValue;
                setEntity.StatusId = true;
                return setEntity;
            public void Setup()
                switch (Action)
                    case ActionType.Insert:
                        Clearer(); //clears all textboxes and set all comboboxes to default
                        this.PatientNumberTextBlock.Visibility = Visibility.Collapsed;
                        this.PatientNumberTextBox.Visibility = Visibility.Collapsed;
                        FunctionButtonsCon.ExecuteButton.Content = "Add";
                        FunctionButtonsCon.DeleteButton.IsEnabled = false;
                        FunctionButtonsCon.DeleteButton.Visibility = Visibility.Hidden;
                        break;
                    //**Setup Update
                    case ActionType.Update:CurrentPar.Id = (long)IdTextBox.Text;
                        LoadSingle(CurrentPar);
                        this.PatientNumberTextBlock.Visibility = Visibility.Visible;
                        this.PatientNumberTextBox.Visibility = Visibility.Visible;
                        FunctionButtonsCon.ExecuteButton.Content = "Save";
                        FunctionButtonsCon.DeleteButton.IsEnabled = true;
                        FunctionButtonsCon.DeleteButton.Visibility = Visibility.Visible;
                        break;                
                LastNameTextBox.CaretIndex = LastNameTextBox.Text.Length;
                IsVisibleChanged += AutoFocus;
            public void LoadSingle(PatientParams parameters)
                var entity = itemMgr.Retrieve(parameters); //calls the BusinessLogic
                IdTextBox.Text = (entity.Id);
                PatientNumberTextBox.Text = (entity.PatientNumber);
                LastNameTextBox.Text = (entity.LastName);
                FirstNameTextBox.Text = (entity.FirstName);
                MiddleNameTextBox.Text = (entity.MiddleName);
                AddressTextBox.Text = (entity.AddressLine1);
                CitiesComboBox.SelectedValue = (short)entity.CityId;
                ProvincesComboBox.SelectedValue = (short)entity.ProvinceId;
            public void Save(ActionType action, int userId)
                itemMgr.Entity = GetPageEntity();
                bool doesExist = false;
                switch (action)
                    case ActionType.Insert:
                        if (itemMgr.Insert((itemMgr.Entity), userId, ref doesExist))
                            System.Windows.Forms.MessageBox.Show("Successfully added a Patient!", "Patient Insertion");                  
                        else if (doesExist)
                            System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Insertion");
                        else
                            System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Insertion");
                        break;
                    case ActionType.Update:
                        if (itemMgr.Update(itemMgr.Entity, userId, ref doesExist))
                            System.Windows.Forms.MessageBox.Show("Successfully updated a Patient!", "Patient Modification");
                            itemMgr.Parameters.Id = itemMgr.Entity.Id;
                            Action = ActionType.Update;
                            Setup();
                        else if (doesExist)
                            System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Modification");
                        else
                            System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Modification");
                        break;                
            public void Clearer()
                IdTextBox.Clear();
                PatientNumberTextBox.Clear();
                LastNameTextBox.Clear();
                FirstNameTextBox.Clear();
                MiddleNameTextBox.Clear();
                CitiesComboBox.SelectedIndex = 0;
                ProvincesComboBox.SelectedIndex = 0;
                AddressTextBox.Clear();            
            public void BindComboBoxes()
                CitiesComboBox.ItemsSource = new BindingSource(CommonMgr.GetCitiesDropDown(), null);// the CommonMgr is a static class from another project. It works just fine
                CitiesComboBox.DisplayMemberPath = "Value";
                CitiesComboBox.SelectedValuePath = "Key";           
                ProvincesComboBox.ItemsSource = new BindingSource(CommonMgr.GetProvincesDropDown(), null);
                ProvincesComboBox.DisplayMemberPath = "Value";
                ProvincesComboBox.SelectedValuePath = "Key";
                CitiesComboBox.SelectedIndex = 0;
                ProvincesComboBox.SelectedIndex = 0;
            #endregion
            #region Events
            private void FunctionButtonsCon_OnExecuteClick(object sender, RoutedEventArgs e)
                Save(Action, SessionHelper.MyUser.Id); //SessionHelper.MyUser.Id
            private void FunctionButtonsCon_OnUndoClick(object sender, RoutedEventArgs e)
                if (Action == ActionType.Insert)
                    Clearer();
                    return;
            private void FunctionButtonsCon_OnBackClick(object sender, RoutedEventArgs e)
                Exiter();
            private void FunctionButtonsCon_OnDeleteClick(object sender, RoutedEventArgs e)
                var ans = System.Windows.Forms.MessageBox.Show("Are you sure you want to delete this entry?", "Patient Deletion", MessageBoxButtons.YesNo);
                if (!Equals(ans, System.Windows.Forms.DialogResult.Yes)) return;
                Action = ActionType.Delete;
                Save(Action, SessionHelper.MyUser.Id);
                Exiter();
            #endregion

    Hello Kokombads,
    I thought you are using MVVM from your title but it seems your project is just a simple WPF project. In that way, please check the following msdn article to know how to Implement Property Change Notification
    https://msdn.microsoft.com/en-us/library/ms743695(v=vs.110).aspx
    using System.ComponentModel;
    namespace SDKSample
    // This class implements INotifyPropertyChanged
    // to support one-way and two-way bindings
    // (such that the UI element updates when the source
    // has been changed dynamically)
    public class Person : INotifyPropertyChanged
    private string name;
    // Declare the event
    public event PropertyChangedEventHandler PropertyChanged;
    public Person()
    public Person(string value)
    this.name = value;
    public string PersonName
    get { return name; }
    set
    name = value;
    // Call OnPropertyChanged whenever the property is updated
    OnPropertyChanged("PersonName");
    // Create the OnPropertyChanged method to raise the event
    protected void OnPropertyChanged(string name)
    PropertyChangedEventHandler handler = PropertyChanged;
    if (handler != null)
    handler(this, new PropertyChangedEventArgs(name));
    It is not so complex, you only need to refer to the interface from here:
    https://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
    And understand that you have to do the following:
    For change notification to occur in a binding between a bound client and a data source, your bound type should either:
    Implement the INotifyPropertyChanged interface (preferred).
    Provide a change event for each property of the bound type
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SharePoint 2013 three-tier architecture

    Hi all, I am going to install SharePoint 2013 in a three-tier farm environment.
    I understand that the only difference between web server and app server is whether or not the "Microsoft SharePoint Foundation Web Application" service application is running or not. If yes = web server, if no = app server. App server is also where
    CA is installed. Both web server and app server will have connection to DB. When web server serves web page requests from users, it will go to DB directly to get the page content.
    However, the real three-tier architecture actually means that only app server should have access to DB. Web server will get the information it needs from the app server.
    Is my understanding correct so far? Why is there a difference between three-tier architecture when it is applied in SharePoint context?

    No, all SharePoint servers directly interface with databases for services that they host (with some exceptions). 3 tier just means you have a "WFE" which end users interact with, and it doesn't matter what services are on that "WFE",
    another SharePoint server which may do the same or other things, but users don't directly interact with, and of course the SQL Server.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Sharepoint 2013 Foundation three tier farm with two Webservers in NLB

    Heloo,
    I have been strugling with a problem the last htree days.
    I have instelled and configured a sharepoint 2013 three tier farm with Sharepoint 2013 Foundation and MS SQL 2014 Express. This is a Test Farm and all the servers are Windows 2012 R2.
    I have one SQL Server, one Application Server and two Webservers. The tow web servers are configured with Multicasting NLB. The NLB name is "sharepoint.ws.domain.net". The IP of the NLB is also in our DNS Zone.I have made a Web Application with
    the name "sharepoint.ws.domain.net" on port 80 (NLB name) and a Site collection with the same name.
    Now whene I am working on the Sharepoint Site I get very offen a login Window or I get the message "An error occurred while processing the request on the server. The status code returned from the server was: 0".
    The error "An error occurred while processing the request on the server. The status code returned from the server was: 0" comes when I try to create a sub Site (most with no Permissions inheritance)... but not allways. I also get  sometimes
    the same message when I upload files (MS Office documents and PDF files).
    The login Windows comes whene I am navigating throw the Sites... but also not allways.I go to the Site with an IE11 and the Site is also in the Intranet security sites.
    Can you help me on this one...
    Kind Regards
    Ioannis Kyriakidis

    With no hostname on the Web Application, you have to create Host-named Site Collections. So that complicates things a bit.
    As far as NLB setup, you create Web Applications the same way you would otherwise. NLB is simply installed on both Web Servers and placed into the NLB VIP (virtual IP). The DNS A record points at the VIP.
    Also set up your Windows NLB using Unicast instead of Multicast. If you have certain types of switches that block unicast ARP from multiple clients, e.g. Cisco, you may have to make an exception for them (e.g. http://www.cisco.com/c/en/us/support/docs/switches/catalyst-6500-series-switches/107995-microsoft-nlb.html).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Using eclipselink in a three tier

    Hi, I'm using eclipselink in a three tier architechture. Normally this is set up with just one database user having a connection pool. What I want to set up is that all client users log in and get their own connection, so that they use their own database user account. So I need somehow to create an entitymanager that does not use a connection from the connection pool, but creates a connection using the credentials the user logged in the application with.
    Can someone give me a hint how to achieve that?
    TIA,
    Tom

    Hi,
    You can customize the session to use the username and password for logging to database.Below sample code uses sessioncustomizer to customize the user credentials for database login.
    If you are using the JDeveloper for Toplink development.
    Open the persistence.xml in flat editor and select the Topink customization tab and select the below class for Session customization.Whenever application is run the database login will be customized to the passed in username and password values.
    import org.eclipse.persistence.config.SessionCustomizer;
    import org.eclipse.persistence.sessions.Session;
    public class SampleSessionCustomizer implements SessionCustomizer {
    public SampleSessionCustomizer() {
    super();
    public void customize(Session session) throws Exception {
    session.getLogin().setUserName(userName);
    session.getLogin().setPassword(password);
    Hope this helps.
    Regards,
    P.Vinay Kumar

  • How to Use Swing-ADF in a Three-Tier-Archiitecture

    I am currently avaluating Swing-ADF (11g) and I wonder how I can leverage it in a three-tier, rich-thin-client-environment. When I bind a control, normally I would do it directly to the database. As I want to have my business logic and database access on the middle-tier, how do I bind my controls to the middle-tier which in turn accesses the database. Does ADF support a mechanism to bind the Swing-Client to the middle-tier-data? Is the recommended way to go for webservices? Can Webservices easily bound to the ADF-controls? Is it the only way?
    best regards
    Stefan

    Stefan,
    It is a built-in feature of ADF Business Components to expose an application module as a stateful EJB session bean to support three-tier Swing-client access. It requires absolutely no effort from the developer, who can even easily switch between running/testing in 2-tier or 3-tier modes. Shay's answer is valid for the general case, but in the specific case of what the ADF tech stack can bring to bear to solve your problem, it can be completely simple to achieve (even requiring zero code, if you choose to leverage that feature of ADFBC).

  • Three Tier Configuration

    Hi friends,
    I am planning to implement oracle three tier architecture and want to know -
    How the oracle three tier architecture should be configured on a network?
    As per my information :
    Database Tier : Oracle 9i server database on a machine
    Middle Tier : oracle 9i AS as middle tier on a machine
    Client Tier : what software should be installed on client tier?
    As middle tier need
    Pentium 300MHz,6GB hdd space,512 RAM
    What are the minimum requirement of client tier to run form and reports applications?

    1. Use 10g Application Server - You have to install the Enterprise version for forms & reports servers - you can choose to not configure the pieces you don't want to use as part of the setup though.
    2. Java plugin is more mature than the jinitiator. Java plugin works on more systems and is much quicker since its much newer than the 1.1.8 and 1.3.x version oracle provides - Sun or IBM jvm's work great.
    3. In most cases uses have an office application, email application or other tools running in conjunction to being logged into a forms/reports application. With the over head of multiple browsers, jvm, and other applications i wouldn't recommend anything else. With Pentium 4 systems fully loaded for business systems running 699.00 or less (dell/hp/gateway) i don't think client side computing power should be an issues - especially if you can afford the licensing costs of the application server to begin with :)
    In my experience give your "power" users (the ones running your business apps) the POWER they need to get the job done right and they will appreciate the new systems you implement rather than fear them. A PC upgrade is alot easier then months and months of headaches with people complaining about response times, load times, performance and application useability.

  • Three tier archictecture

    I need assistance.. regarding three tier architecture... Presently I installed oracle 10g database on one server.. 10g AS(application server) on other and 10g IDS on client part... Please guide me how do I configure the system so that it will communicate... and work properly....

    Hi,
    You can find all the information you need at:
    http://tahiti.oracle.com/
    In the bottom of the page you have the AS options, remember to 10g you have 4 options:
    - 10g Release 10.1.4
    - 10g Release 10.1.3
    - 10g Release 10.1.2
    - 10g Release 9.0.4
    Best Regards,
    Francisco Munoz Alvarez
    www.oraclenz.com

  • How to install oracle applicatons in a three tier architecture

    Hi,
    i want to install oracle apps in a three tier architecture?
    application tier -- middle tier
    database tier -- database tier
    Any steps or a meta link document
    Regards
    Sudharshan

    Hi,
    http://download.oracle.com/docs/cd/B34956_01/current/acrobat/120oaig.pdf
    Pages 2-10 and Pages 2-19 don't specify this ???
    They indicate only having to install with rapidwiz 1 time (as root user if appl/ora accounts setup) ??It is mentioned in Page 1-2
    Release 12 utilizes the conf_<SID>.txt file in certain situations, for example where the database has not yet been created. The configuration file is also employed in multi-node (distributed) installs, where you only need to enter the install information once, on one machine, and can then copy the configuration file to other machines as required.
    If you are installing in an environment where different machines are used to support the database and Applications tiers (as is typically the case), you would run Rapid Install on each machine in turn, starting with the database machine.
    Regards,
    Hussein

Maybe you are looking for

  • Send a mail by using MHP1.1.2

    How to send a mail by using MHP1.1.2? Thanks, Ranikkarasu

  • Anyone Experience WebCenter Suite 11g ins tall with UCM on Linux?

    I have been installing and facing several issues with this. It is extremely slow on weblogic server. starting weblogic server takes around 30 minutes. The deployer keeps deploying for ever. Not sure if I am doing something wrong. Here are the steps I

  • Folders are missing?

    Turned computer on today and all of my customized folders are missing except for inbox, drafts, sent and trash. Help?

  • Essbase error 1030725

    Hi. From Obi Admintools -> File -> Import -> From multi-dimensional and select Essbase and I put the data to connect I have this error: Essbase Error 1030725 My environment have this: ESSBASE Server: 11.1.1.2 in Solaris 10 SPARC OBIEE: 10.1.3.4 in So

  • JDeveloper Deployment of WAR Files to Tomcat

    Hello I'm new to learning JSP development, using JDeveloper (10.1.3) and Tomcat(5.5)/Jakarta ISAPI Redirector (1.2.14) on top of IIS. I'm just starting to get the hang of web applications and directory structures. So far I've been manually copying my