Inocencio Oliveira

Greenhorn
+ Follow
since Oct 13, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Inocencio Oliveira

I did it, but I have some questions.

how can I test some conditions about client, like:



Thanks again!
Thank you Rahul, I will try this way soon and repley back here.
Hi people!

If I have for example two entities, Client and Product, in product entity I have a relationship with client, so I have a @ManyToOne JPA relationship.

Client

Product
- client_id

But I wonder to make an "inverse" JOIN (left) query, because its possible under native SQL using <type> JOIN ON Table (id1 = id2), but how to figure out some situation under JPA?

If I heading doing something like that I got an error:



Because 'ON' clause is not allowed up there, I know that I can use other maner like:



But sometimes I have to use like an native SQL, to JOIN a entity that don´t have directly link. Sorry If I was not clean in my ideas.

Regards!
Hi folks!

I wonder to get the point when there are different (about results). I created three files to represents each both situations (a include directive page, a jsp:include directive page and a page to be imported).

Content to be imported


Include directive


jsp:include page


Both pages behavior are the same, but I was thinking that in a include directive situation the content will just be displayed once, and if try to refresh the browser the Date displayed are the same from the old refreshing, but I noticed that the content is updated each refresh. I really don´t know when the pages behavior will be different.

Thanks all and sorry about my leak english!
I read that the container creates for each request captured a thread. I know that one thread is generated to handle one Servlet instance, if you have ten started Servlets and all up, so you got one thread for each Servlet started, but for each request do you have addicional threads running?
My intention is to build an UI Builder. But I have to concentrate new ideas to build further a real UI builder, but in primor state I´m doing new samples to build different stuffs, first: how to draw dots to represent some grid context, next... (I hope) how to build components at screen that are dragable and fix to scen, and so on.
13 years ago
I did a kind of "dot grid" to represent the slots that any dragable component can be fited. Its just a start code, I will try to implement next step some way to drag component to the form. Check the code following...



Next step I will try to do something more useful.
13 years ago
Sometimes happened that I figured out how to build a UI builder, like a jasper report or a netbeans matisse are. As harder is to implementing something like that, a builder to create UI. I´m trying to find out some infos but not found. My idea is to create for example a JForm (or something similar), create some dots (to represents rules) and a structure to drag on drop components from a palete.

A justed starded and put via code a JLabel, but not from a palete, and that label one action I can do atm is to move this component surrounding the form. I have a lot of thing to do and thinking about to create a real UI Builder. If I take something functional I can go further next step and mind what I can do with this tool.
13 years ago
I was changing the connection context from my application. I�m trying to get EntityManager pattern up.

I created a persistence.xml and defined some tags:



Hence, my database is a H2 link here. I chose this to run my app into a local context, because the other database must be SQL Server, and I need to work with both.

In hibernate session context, My connect was running ok, creating automatic DDL, inserting, retrieving datas, deleting, everything was ok, but now I am trying to use EntityManager pattern with JPA and some stuffs are getting wrong like that:

:arrow: It�s doesn�t knows any H2 dialect. Appears some warning information:



And the hibernate try to create the tables but something get wrong when it�s try to create sequence

I was defined sequence schema into my persistence class like:



So, hibernate show an error message:



I really don�t know how to fix it. In the session context everything was ok, but now everything get wrong. I have to fix it and put H2 to work with toplink JPA EntityManager context.

Someone have done H2 running with this context?

Thanks all!
[ December 28, 2007: Message edited by: Inocencio Oliveira ]
I wrote my idea for that issue.

---------------------
Suggestion for database synchronize!

Author: Inoc�ncio
Date: 13/12/2007

- A local database must make synchrony with a remote database.
- There are a control version to any record of each table that can handle the process of a local database, tables that cannot be downloaded will not handled of control version process.
- When one or more auditor are working on online mode (and there arenp�t downloaded records), the cv will not be applied for those records.
- If at least one auditor download one record, this record will be controlled by cv, both online and offline modes.
- For the cv, is only important the last record process. If the user have changed record data so many times, the last time will take permanent.
- For each download process, the local database will stored from the begin (empty base till download all marked contents), the local database only have content from the last actual database schema, not keeping cv from previous process.
- Will not have merge process between records.

Scenario 1

Auditor A will work offline, auditor B will work offline, after all, both will take to online mode, they are working in the same record, but in differents local machine, how the system will put up

Downloading contents to work in offline mode...

Server, row = 1, version = 10

Auditor A, offline, row = 1

Auditor B, offline, row = 1

A = 10, B = 10

Process (operations):

A = 11 (update)
A = 11 (update)
A = 11 (update)

B = 11 (update)
B = 11 (delete)

Momentum of Synchrony (turn to online mode):

B, deleted row number one (B last operation).

ServerListerner know that auditor B want to delete row 1.

The server must knows beforehand which auditors downloaded row 1. He knows that was B and A auditors.

The record is marked as delete operation at remote database, thus will not more longer be available for the system, merely will be useful when auditor A turn back online and take commits.

When auditor A connect to online mode. 'A' will take a warning conflict message (like CVS or SVN when souce files take conflict). Being auditor A the last user that got this record in the version 10. He will decide if our version will overriding the last posted version from auditor B (in that case, delete operation), or will not modify the 'B' decision.

In that exact moment server must do:

If 'A' accept 'B' decision
Permanently delete the record form the remote dabase.
Permanently delete the record form the remote dabase and advertise all envolved parts which occured.
If 'A' accept 'A' version
Overriding B version.
Overriding B version and advertise all envolved parts which occured.

P.S.: If 'A' overriding 'B' record version, the next version number will counted with actual version plus one. In that case was 11, now take 12. And the begin process was 10.

I hope I was clear, cause my english is not so eligible and clear.

Thanks all for your patience. I guess this take import for all that needs take internal database controlled by version.
Unfortunately I need. I will explain why I need it.

The application system works for auditing. The auditor can install application in your workplace, and they can also install the application in your notebook. He can take notebook to any place, other city at all and work into the system (cannot connect under internet).

Because that the system must synchronize and take control version under tables and records to keep datas consistents.

So I was thinking in this solution to solve this issue, I have wrote this thread to discuss this problem, and trying to get some new idea or another solution from my mates here. I exposed my problem, and I am grateful by helping here.

Next post I will show all my notes to this problem.
Thanks Jan, great post!

When I came to home, I will translate to english the schema that I am building for a incomming solution.

I know that it is needed to handle all possible variables, each case can result in many others cases tough enought to carry on. I will try to get some API and try to build a tiny prototype or I will try to implements these concepts as well.

Thanks all for support, lets try to keep this thread on.
My issue is to keep this datas under control. Because the client can be stay away from the server, in this case local database start to works.

When he comes back to server. The control version must apply changes, check all data modifications, compare versions and try to do something with or without user request.
Yeah Paul,

I was thinking to use some SVN (or CVS) concepts into my tables and modules. Tables carrying control version and works that like that in internal way.

When someone wanna to commit some row that this row is not up-date, the conflict will raise out to the screen and users make decition, right choose to put the data overloaded.

I want to make like SVN, but for tables and rows. Is it a good idea? I think is almost impossibile to find out some API or something implemented yet.

Thanks all.
Hi all!

I have two databases in my application, one is a server side database, the other one is a local database.

My client must work into online mode (server db) or offline mode (local db). When offline mode is chose, some tables from server side must be downloaded to allow the client to work in offline mode. When he turn back and connects to server, the server must synchronize local data with server data.

I was thinking to put on some version control or some API that can help me to do it more fast and easily.

Someone have some tips or know some API or something like?

Thanks all!