Oracle ADF 12 Project Structure - oracle

I'm developing a ADF Fusion Web Application in JDeveloper 12. After the creation of the project I took a look at the file system and a bunch of directories were created.
Can anyone tell me what the .adf folder is good for? I can't find anything about it in the Oracle Docs. I'm developing with git and I'd like to know if I have to version this directory, too.
Thanks in advance!

Inside the above mentioned folder can be found two files: adf-config.xml and connections.xml. For an overview of their usage you can take a look at these links:
Oracle ADF XML File Appendix and Web Center. In both of them it states that there are stored application-level setting during design time, which can be used later during the deployment process (it seems quite important though :) ). So, even if you delete that folder it should be recreated if you make any changes and redeploy the application, BUT, if it is there it means it should be there (typical Oracle politics ;) ). So even if you are really in need of their settings (such as modify connection details to point to production server instances) it should be versioned as well.
I'm using svn, and it does version it automatically.
Hope this helps.

ADF creates several files and folders that are needed by the project.
It creates them when the project uses a functionality that needs those files.
In .adf/META-INF/ you can find adf-config.xml & connections.xml which are Application Level Settings.
But for example src/META-INF/jazn-data.xml doesn't exist until you enable Security on your application. This file is also needed and should be on SVN/Git.
ADF also creates some temporary files and folders that shouldn't be on Git/SVN.
Like: .data/.
Depending on what technologies you use from the ADF stack (ADF BC, ADF Model, ADF Controller, ADF Faces), you should understand what files and folders are created.
If you have searched for .adf/ in the official Documentation you would have found your answers.

ADF by default creates .adf and .data file, .adf file you can say is for holding various info related to your workspace in IDE i.e the connections that its having with Database, META-INF info used for customization purpose.
& .data support your MDS functionality.
we can always delete it but our Jdev will create it automatically, whenever we rebuild our application.

Related

How to turn this source code into a actual software

So I have this source code of a software which is probably developed in oracle.
Can anybody tell me how can I turn this into an actual software?
I am a newbie.
Screenshot
Those are Oracle Forms (.fmx) and Reports (.rep) executables, as well as a Menu module (.mmx). In order to run them, you'd first have to know which Oracle Developer Suite version it is; might be anything from at least 4.5 over 6i/9i/10g or even later; who knows, they all share same extensions.
Forms up to 6i are client-server; later versions are web-based so you'd have to install IAS (Internet Application Server) or WebLogic server; none of those installations is trivial so - if you can't even recognize what you have, you'd rather not do that on your own - consider hiring a consultant.
Once you manage to set it up, you'd run the .mmx file as it looks as the menu for that application.
However, it's not that simple - in order to run such an application, you have to establish connection to the database, i.e. a schema that contains tables used by this application. There's the "Database" folder - maybe it contains some more useful info, perhaps export file (.dmp), maybe even .dbf files ... can't tell just by looking at the icon.
It might be enough if all tables are owned by the same user; otherwise, application might fail because of missing dependencies.
Finally, I think that your best option is to find out someone who actually knows what it is, which development software was used to create those forms & reports and then see if something can be done. It would be simpler/easier if you had .fmb and .rdf (or .jsp) files instead of executables as you could edit them.

apex static files apex4.0.2

I am using Apex4.0.2.
Does anyone know what kind of query Shared Components / Static Files uses?
It is certainly a view on WWV_FLOW_FILE_OBJECTS$.
But looking at view APEX_WORKSPACE_FILES not all
(workspace_id - workspace_name - application_id - application_name - mime_type)
appear in Shared Components / Static Files
I am using Ant to assemble and upload static files to oracle because it's quicker than using the interface. The result in WWV_FLOW_FILE_OBJECTS$ is usable but doesn't appear in the interface under Shared Components / Static Files which would be good to have.
Is there an auxilliary table involved?
Alastair
My suggestion is don't do this. Messing around with undocumented, internal storage is probably going to end in heartbreak. Do you never intend to upgrade your Apex instance? Who knows if this will keep working once you do that. I'm assuming this is "too slow" as you move an application from one instance to another?
My first suggestion is upgrade to Apex 5.x. When you do an application export, the application files (not the workspace files) go with the application and are installed when you install the application. Which, by the way, you can do from sqlplus in a script.
If you're stuck with Apex 4.x for the moment, what I did was to add the files to the application, then create an install script (I forget what section of Apex you do that in) that installs the files. This is a little annoying, because every time you change the file, you have to delete the script and recreate it.

How can I use partial server projects in my server project?

Scenario:
In my organisation, we separately develop multiple applications. In the end however, many of the applications (and their databases) are deployed to the same SQL instance, so they share the same master database.
We use Visual Studio 2010 database and server projects to source control said databases.
To try and standardise some things, I want to do the following:
Create a 'Core' Server database project which has all the server settings, core logins etc. Things like SET TRUSTWORTHY ON and server-level ANSI settings etc.
Have each Application's own Server.dbproj specify the logins and roles etc specific to that application.
Have each Application's own ApplicationDatabase.dbproj reference the ApplicationX.Server.dbproj
In theory, each Application in source control would only contain the items specific to it, rather than keeping server related settings or configuration synchronised across many projects.
Problem
However, in practice I can get this far:
Done. Produces a .schema file which I reference in future steps
Done. Server.dbproj happily references Core.dbschema and 'extends' it with it's own logins and roles etc. Is happy to deploy this anywhere I point it.
Nadda. I add a reference from ApplicationDatabase.dbproj to Server.dbproj (assuming Server would pull in the items from Core) and it complains about any logins that are actually in Core.
So I then added both Server and Core as references to ApplicationDatabase as it settled down. Compiles fine.
However, when you deploy, you get the same problem described here: http://social.msdn.microsoft.com/Forums/uk/vstsdb/thread/23cb9132-00d4-42ed-b34c-ab49027cddf7
Error TSD01234: The source model contains 2 server option elements.
Only one element can be contained in a model that can be deployed
The problem I think is that ApplicationDatabase essentially has two Server projects that it knows about, and therefore duplicate settings.
Microsofts documentation makes no mention of using partial projects in Server projects, but neither is it listed as a limitation.
So the question is...
Has anybody used partial projects successfully for Server projects, or is there a way you can see to achieve the same thing?
I'll be honest and say I won't just 'remove the Server projects' to make the problem disappear - we had it working very well up until I tried to improve things!

Seriously, overriding the DefaultDataPath in the sqlcmdvars for a SQL Database project deployment

I have an SQL 2008 database project in Visual Studio 2010 that is sync'ed on a regular basis from a schema comparison during the development phase. This same project is also under TFS source control. I have two environments, Debug and Production. Each environment is a single machine that runs both IIS and SQL Server. The production environment however has different data and log paths for the database D:\Data\ and E:\Logs\ versus my development server at the standard c:\program files\sql....\data.
What I'm trying to do is setup the way I transact my deployments from the debug to production environments. I've gotten WebDeploy 2.1 setup and I build my deployment packages in Visual Studio via the right-click context menu on the website project. I want to manually copy deployment packages to the production server via RDP, so there's no over the wire concerns here. The deployment package settings are setup to include all databases configured in Package/Publish SQL tab. In the Package/Publish SQL tab I don't pull data from data/schema from an existing database because I want to deploy from the SQL database project instead. So I just point to the pre-generated .sql script file located in my database project's /sql/release folder. To top it off, I generate the .sql script in the post-build events in the SQL project via VSDBCMD.exe /dd:- /a:Deploy /manifest:... so that a simple solution rebuild all, then website project deploy ensures I always have the latest .sql script in the deployment package.
This is great and all, but I have a major problem here I can't seem to overcome. It has to do with the database data and log files paths being different from debug to production environments. I actually receive an exception during the WebDeploy in IIS on the production server that says it can't find c:\programs files...\MyDatabase.mdf file. And what's scarey is after this exception, the entire database is deleted. The empty databases I create right before doing the deployment. Happen both times I tried messing around with it. I'm not sure how I feel about that, but I'm hoping I could find a reliable solution to this.
I have been feverishly looking for a way to change the paths during a deployment and have found many places that mention changing the paths in the *.sqlfiles.sql files under Schema Objects\Database level objects\Storage\Files because the path it tries to deploy to is the path specified in those because of the Schema Comparisons and Writes from the Debug SQL server database. Changing the paths here will work temporarily, until I do my next schema comparison and write, then the sqlfiles.sql files will get overwritten with the info from the Debug database again. And I don't want to have to remember to never update these files during a schema comparison because any mistake has the potential to delete the production database.
I think my salvation lies in my Release.sqlcmdvars file. It's a tease actually, I can see a place I "could" type the default database path, but it appears to a read-only field as it mentions "Location where database files are created by default (set when you deploy)." It would be grand if I could specify the paths here. Is there any way at all to specify the path in a variable here that would override the paths from the *.sqlfiles.sql files?
In the solution where I work at, there are two custom variables in the sqlcmdvars called Path1 and Path2 that I thought were reserved names that do such that. However, this doesn't work in my solution and the difference between the two solutions are the other solution gets deployed via TFS build controller. Doing the TFS build controller route isn't an option really because I opted out to save money while using a third party source control service.
Any help with this would be great. I have even gone so far as to create separate *.sqlfiles.sql files for debug and release and configured the dbproj file to use one or the other depending on the Configuration, but this doesn't seem to be working either. Also, using the custom PATH1 variable in the sqlfile.sql file like FILENAME = '$(PATH1)\Cameleon_log.ldf', doesn't work either. I seriously think it shouldn't be this difficult. Am I missing something simple here??
Thanks!
Okay, this was an exercise in futility. Apparently with out syncing with the target database during the script generation the script would be exactly what is needed to build the database from scratch. Even if I could override the file paths, the deployment would complain about database objects already existing. I needed to specify the connection string of the target database in the deploy settings so a comparison is done during the script generation and only the relevant differences are added to the script. I really wanted to avoid exposing my production SQL server to the outside world, but it is what it is. No need to override the paths anymore because it looks the database file paths are conveniently ignored during this comparison!!

MVC Code First: App_Data Folder Not Being Created

I'm using the MVC Code First approach to create a SQL Compact database (from WebConfig: data source=|DataDirectory|MailBoxDB.sdf). The .sdf file should get created automatically, and it does if I manually create the App_Data folder on the web server (Windows Server 2008). However, I'm trying to automate the deployment process and I want to eliminate this manual step. I'm using MSDeploy to create the deployment package. Is it a permissions issue that prevents IIS (7.5) from creating the App_Data folder on its own? If so, which settings should I be focusing on? Any ideas?
I had a similar scenario (generally more complex, although without a database in App_Data). I pieced together several SO questions and found a solution which I've posted on my question on the same topic. Take a look at my answer and hopefully it helps.

Resources