JPA use when jMaki small parts in the Dynamic Data (1)
JMaki provides a number of Web can be embedded in the application's data on the components. For the majority of small parts used, to be bundled with the database back-end, for example, we have to consider the design of a show you need to stock information Table small parts. This paper will set out to create Web applications such steps, the application deployed in the GlassFish V2, which includes a jMaki packaging Yahoo Data Table small parts for JavaDB recover from the data.
Project to create Web applications
In NetBeans IDE 5.5.1, the creation of a new Web Application project and was named jmaki-jpa.
Shown below, select GlassFish V2 as a Server:
In the creation of projects at the same time, by clicking the Next button Add jMaki Ajax Framework.
Shown below, select Standard layout:
Click Finish.
Configuration Database
NetBeans IDE in the Runtime tab, expand Databases, to connect to the default database (URL for jdbc: derby: / / localhost: 1527/sample [app on APP]). User ID and password are designated as app.
Right-click the new link and choose Execute Command … and to generate input for the following table definition:
Create table COMPANY (id int,
CompanyName varchar (255),
Price float,
Change float,
PercentChange float,
LastUpdated varchar (50),
PRIMARY KEY (id))
Right-click the database connection, select Refresh Tables trees can be seen in the new table. COMPANY choose Table, right-click and choose Execute Command …, enter:
Insert into COMPANY values (1, 'A Co', 71.72, 0.02, 0.03, 'Jan 1, 2007, 10:00 am');
Insert into COMPANY values (2, 'B Inc', 29.01, 0.42, 1.47, 'Feb 1, 2007, 10:00 am');
Insert into COMPANY values (3, 'C Group Inc', 83.81, 0.28, 0.34, 'Mar 1, 2007, 10:00 am');
Insert into COMPANY values (4, 'D Company', 52.55, 0.01, 0.02, 'Apr 1, 2007, 10:00 am');
Now, we have the database structure has been created and filled it.






