FuseEsb where are stored my classes - jar

i deployed through maven my jar in Fuse Esb .
Where fuse esb store my classes ?
I've searched in my installation but nothing.
I use fuse-esb-7.0.0.fuse-061 .
Thanks !
Carlo

Fuse ESB stores the JARs locally in its cache, which is located in data/cache. The local cache renames the JARs to something else, such as bundle146 etc.

Related

How to create a customized repository for websphere (Application server)?

I want to create a customized repository for websphere and publish that URL using IHS server.(preferably i want to do it in Windows server ) so that i can use that link to access binaries for installations/upgrades/patchings from other servers(Linux/Solaris) in my environment. Can anyone please provide the process ?
WebSphere Application Server install and maintenance is managed with a tool called IBM Installation Manager (IIM). There is an optional tool called PUCL (Packaging Utility Commnad Line) that allows you to mirror existing repositories into directories that are directly usable over ftp:// and http://
A good summary of PUCL relative to WebSphere is available here:
http://www.ibm.com/developerworks/websphere/library/techarticles/1201_seelemann/1201_seelemann.html
You can use the IBM Packaging Utility to create custom or “enterprise”
IBM Installation Manager repositories that contain multiple products
and maintenance levels that fit the needs of your business. As an
administrator, you can control the content of your enterprise
repository, which then can serve as the central repository to which
your organization connects to perform product installations and
updates. IBM Packaging Utility essentially copies from a set of source
IBM Installation Manager repositories to a target repository and
eliminates duplicate artifacts, helping to keep the repository size as
small as possible. You can also delete (or “prune”) a repository,
removing maintenance levels or products that are no longer needed. IBM
Packaging Utility 1.5.0.1 can be downloaded at no cost from the IBM
Support Portal.
$ PUCL copy com.ibm.websphere.BASE.v80 –repositories
http://www.ibm.com/software/repositorymanager/com.ibm.websphere.BASE.v80 -target D:\WASBase8001

How to add a jar to the servlet CLASSPATH?

I need to connect to a mysql database via servlet. I understood that it's not enough to add the jar to the project (properties->java build path->add external), but I need also to add the jar to the classpath.
What means that? How to do it? I searched here for answer and didn't find, except the idea to copy-paste the jar to the src directory - that doesn't fix my problem.
My main problem is:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
It depends on, which servlet container (== java web server) are you using. It is probably tomcat, but you need to share this information with us. My answer is for tomcat.
On tomcat, your application has somewhere a root directory (for example, /var/lib/tomcat/yourAppName on linux).
Below this directory, there is a lib subdirectory. This directory is already in your classpath, so it is enough to copy the needed jar into it.
There are much more complex solutions (for example, installing jars into the server classpath and into this application-specific lib directory), but these are probably unneeded in your case.

Gradle non-managed remote dependency

I have a jar dependency that resides on a remote server. How do I resolve that in Gradle? There doesn't seem to be a way to define a repository for remote files, only local files, and I'm something like this doesn't seem to work either:
compile("group:name:version") {
artifact {
url = "http://server/dep.jar"
}
}
The docs seems to hint that something like this should be possible, but so far I'm unable to find an example anywhere.
Support for non-managed dependencies: If your dependencies are simply files in version control or a shared drive, Gradle provides powerful functionality to support this.
Any ideas?
Unfortunately, according to gradle documentation a remote share is currently not supported.
However, this can be worked-around easily by doing the following:
Copy that will copy the remote jars locally. A possible location for such code can be the repositories configuration to ensure that the files will be copied before the dependencies will get resolved.
Define a local repository pointing to the local location of jars.

Need Pointers | Using JDBCTemplate | CQ 5.5

I need some pointers/suggestions on following scenario.
Scenario:
We are trying to use JDBCTemplate in CQ 5.5 for querying database (Oracle 11g). As first step we have integrated CQ with Spring Framework. Now for JDBCTemplate to work it requires JDBC driver that needs to be loaded separately into CQ as it is not available with Spring jars. The jar that is required is available here http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html and jar in my case is “ojdbc6.jar” that contains OracleDriver class (JavaDoc: *http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html*) required to register the driver to create connection with Database.
Problems/Suggestions required on following points:
As oracle 11g is commercial product so there is no repository available online for it (for pom dependencies), we need to create a separate local repository for it. (Need pointers; is there any other way to do it?)
Jar mentioned above is not OSGi. So how to approach in that case? (I have created OSGi bundle by following directions mentioned here http://cq-ops.tumblr.com/post/21893960212/how-to-turn-a-jdbc-driver-jar-into-an-osgi-bundle-jar)
In this process of converting this jar to OSGi Bundle I have to remove versions mentioned with Imported Packages in MANIFEST.MF file. (As I understand that CQ by-default picks the latest version that is available for any class, there may be problem when a new version of any class is available that is not compatible with current version. Need pointers; should this be looked into priority? Has anybody faced any issue due to this in any project)
Current Status:
By converting ojdbc5.jar to OSGi bundle; I was able to use JDBCTemplate. But looking for some pointers to check is there any other approach someone has followed in other project to achieve scenario mentioned above?
The oracle driver is not published to any public maven repo. So indeed you will have to put the jar into your own maven repo
In Apache Karaf there is a nice feature where you write wrap: in front of a bundle url and it automatically creates a bundle on the fly using the bnd tool.
If CQ does not have such a feature then you will have to create the bundle on your own. In this case the maven bundle plugin can help you. You can depend on the oracle jar using a maven dependency. Then you can define exports for the packages of the oracle jar. Bnd should then automatically inline the classes in you bundle jar. Another option is the maven shade plugin. You can take a look at the source of the servicemix bundles. There you find poms to bundle a lot of plain jars.
Not sure what exactly you mean. As far as I know the oracle driver does not have any external dependencies.
I have written a DB tutorial for Apache Karaf that explains how to deal with the oracle driver and how to create data sources without depending on the concrete driver.
The solutions in the tutorial can not be used 1:1 in CQ but it will surely give you some pointers.

Release Symfony2 project to the web

I have almost finished the development of a project developed with Symfony2, and wish to put the project online.
However, I suppose there are a lot of things that need to be done so that everything works ok. I suppose, the dev mode needs to be disabled etc....What needs to be done and how?
What are the most important things to do on a Symfony2 project that will be available to everyone on the web?
I suggest you to use Capifony for deployment. It does a lot of stuff out of the box and you can make it run any custom commands you need. See its documentation for details.
Regarding the dev mode, unless you've removed the IP checks from app_dev.php, you don't have to worry about deploying it. Of course, if you wish, you can tell Capifony to delete it on deployment.
The best way to handle deployment is to create "build" script, which will:
Remove all folders and files with tests from your bundles and vendors.
Remove app_dev.php file
Make sure that app/cache and app/logs are fully writable/readable.
Packs your project into archive (rpm f.e.)
Then, before deployment, you should create tag in your project - so it will mean, that certain version of your application is released (I recommend to follow this git branching model).
Create tag.
Run your build script
Upload archive to host
Unpack
Enjoy your project
Im currently researching the same thing.
The first thing you have to consider is "how professional" you want to deploy. There are a lot of tools you can use:
Continous Integration Server ( e.g. Hudson, Jenkins)
Build Tools (e.g. Phing, Capistrano --> Capifony, Shell scripts)
Versioning Tools (e.g. Git, SVN)
I think the simplest setup is using only a Build tool and i guess you are already using some kind of versioning.
Depending on which tool you use, the setup is different, but I think there are some things you should consider with your application (maybe not all are applicable to your application)
Creating a Tag in your Versioning
Copying the new Code in an folder on production
--> if you are in a new folder you dont need to clear the cache and logs, since these shouldnt be in your versioning the first time.
loading composer (if youre using it)
installing vendors
updating database schema
install assets from your bundles
move symlink from current version to the folder of the new site
These are the things I currently need for my application for production deployment, if you deploy to an test environment you should load fixtures and run your testscripts as well.
One other option that is very well described here is to deploy the Symfony2 application with Apache Ant. Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other.

Resources