fast global search using jsf, spring, hibernate - java

The project, on which i am working,is integrated on spring3, hibernate, jsf2.0, also using annotations.The project have different modules and each module have different processes and each process contains Master Details screens.In module, All Processes are dependent/related to one another from top to bottom.Custom search is developed throughout the module in each process.Now on the project requirements,it needs to develop global search throughout the Module.Each module has 90 database tables with huge data inside and there is a "Item Table" which is used throughout the Module(all processes details screens revised that item). Through global search user will enter an item and search it.Searching should returns all processes details in result(output) within seconds. As i already told above that each table also have huge data inside.What should be the mechanism to develop fast searching feature to avoid from System hanging or going down.
Overview:
Searching Flow:Suppose Item No:1234--> Module-->Each process -->Each process details-->items details found
Developing Tools: eclipse-jee-juno-win32 , Microsoft SQL Server.
I request every one who view this question please help me to share perfect solution as i get correct answer.I will apply correct answer in project.

Related

How to create a report with options to print and view in Java

I'm doing an event for a competition for Desktop Application Programming, and I opted to do it using Java, since it's the only language I've learned so far (I'm a high school student). The competition is to design a desktop application that lets a user enter records of club members (name, date joined, etc), and store them in a master file. I'm handling the master file aspect by creating objects of type Student, and writing the objects to a text file to save them.
The part I'm having issue with is the following: Create a report that will produce a list of members...The report footer should include[...] Have
an option to view or print the report, allowing for 50 detail lines per page and at the end of the report, with the footer information
described above..
I never learned how to create reports in Java, since in the AP Computer Science class that taught java they never covered that. What are my options for creating reports, and how would I make it so that the report could be printed?
You asks for quite some things and probably you'll have to dive into some technologies before implementing the application.
If it has to be Java and a Desktop Application, then today JavaFX is the technology of choice. Concerning your report, it would then be a pageable table showing the 1st 50 entries of your dataset. The problem with JavaFX currently is, that it lacks some features in its GUI elements, which are very common when doing web applications and using GUI component libraries like PrimeFaces where this is readily available. For JavaFX you have to do it on your own (or use some open source tutorial project as base for it).
Concerning printing, this is yet another issue. Here your best choice is probably not to use the Printing API directly, but some API to produce a PDF which would allow you to save and print it.

How do I deploy and manage a small scale Java desktop application?

Some relevant background:
My application is a Java app compiled into a .exe via JSmooth. The anticipated user base would likely be a few hundred users, but could grow well beyond that, as it's a community specific application.
How it works:
2 .jar files, one that preforms initial checks, another with the meat of the application.
Ideally, the init jar displays the splash, checks the version in desktop.txt against server.txt, if they differ, it prompts the user to update.
What I need to figure out:
1) What is a cheap, scalable hosting service that I could use as the file host for updates?
2) How can I create an "updater" to actually preform the jar replacement? My current solution is simply writing an updater in Java, but I was hoping for something like the installers people are more familiar with.
All of the research I've done has resulted in lackluster results, as 99% of hosting searches result in site hosting results. I just need an update repository with reasonable security. i.e., decent DDoS resistance and not left wide open to the Internet.
Edit: formatting
Easy to do and very foolish cheap with Amazon S3 or Joyent Manta as both support time-limited signed URLs and headers (which can contain a SHA-1 of the file) to check to see if the update is needed before downloading
On startup your app would check the update URL to see if it has changed. If it has changed, download the JARs. Do this before the app loads classes from those JARs. Updating the updater itself will be trickier so consider that an update might need a new update URL to prevent expiry.

Run remote app but not the entire desktop

In the company where I work we have, among others, an application made in Java running on two places (let's say Merida and Coatza) and both have different databases. The users from Merida only occasionally used the program to get some info or capture things. Now the company owner decided to control almost everything from Merida but we cant get the databases merged due to operation logistic.
The thing is that when the application uses the persistence-unit to connect coatza it's incredibly slow since the app its not prepared to use remote databases (at least not with a high performance).
I thought of something like teamviewer to run the app remotely but not the database, however I don't want to run the complete desktop, only the application. Or develop a part of the program on JCurses so it can be run from coatza but there is not enough documentation and we use a lot of tablemodels.
Is there something I could do?
The application is a DesktopApp. We use Jboss 5 as server. Hibernate and JPA.
I had a similar situation where we needed to use the same application at different locations because the license was too expensive. I used a feature called RemoteApp on Windows Server 2008. The best part is that you can have a desktop shortcut for any app on a remote computer and all you need to do is open it and login and only that particular app starts running instead of the whole desktop. There is also a web interface for remoteapp so that you can simply login and select whichever app you want to run. For more details take a look at http://www.techotopia.com/index.php/Configuring_RemoteApps_on_Windows_Server_2008

Open 1 file into 5 versions of the same Flex-based App Engine app simultaneously?

I have an application on Google App Engine that is made of Adobe Flex [and Java] components. The app has buttons to do tasks related to the app, including an "Open" button, which allows the user to open a .XML file, which then gets converted into data/content that's displayed in the app GUI. Then I press the "Run" button and it calculates stuff related to the inputted data/content. Also, my datastore is setup using JDO. I'm using only GAE. I'm NOT using GWT.
Based on the nature of the calculations (algorithms) I'm running, I would benefit from being able to open an XML file and then click the Run button on my app simultaneously on lets say 5 different versions of my app that I have uploaded to app engine. The 5 versions would be identical.
Is there a way to create, say, an HTML page where the user would provide a link to the XML file (or open/load it from their disk) to be processed, then press "Go," where then the XML file is passed to all 5 versions of my app, then "automatically presses the Run button" on each?
I can do this manually at the moment by going to each version-specific URL for my app, but it takes too long. Do you have any suggestions for how I would go about setting up such a script?
EDIT: Motivation for the problem:
It's not XML processing time that I'm worried about. I currently have 2 algorithms that compute the number of particular types of "special points" that exist in an inputted XML file which contains large amounts of data. The difference between the two algorithms is that the 1st searches until it finds every special point. Then it stops. The 2nd searches and stops when it finds the first special point it comes across. Using multiple instances of this 2nd algorithm, one has the potential of finding all the points faster than the 1st algorithm.
Unless I am missing something, using different application versions probably isn't the right approach on this. If you are looking for speedier processing of the XML file, try storing the file in the Blobstore and splitting the work into multiple Task Queue tasks that run somewhat parallel.

Run SQLite commands on database in one app from another

I have an SQLite database stored in the assets resources of one application used to load UI and other stuff into the app, mainly just holding text nothing out of the ordinary. I want to be able to get a writable version of this database so I can modify it from another application.
Example:
First application is on the market with limited number of enabled features. User gets to a certain point where they need to buy extra content to do more stuff in the app. The original app has these features but they are not enabled in the app using the database. I want the user then to download a second app from the market which is just used to change one field in the database from disabled to enabled thus unlocking the new features.
I have an idea I may need to use content providers but my understanding is once created they are accessible to all applications. I need it, for piracy reasons I guess, to only be able to communicate with apps signed off by my key.
Thanks
Sam,
I understand what you intend to do, but you are going about it the wrong way. Your 'Unlock App' would not be able to modify the Database in the assets folder of your 'Free App'. That's just general android security model stuff.
You may want to look at this question: How can I use the paid version of my app as a "key" to the free version?
It describes how you can create a 'Unlock App' on the market to unlock features of your 'Free app' without needing to actually modify any of the original data in the 'Free App'.
Good luck

Categories