Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm new on diving in the OSGi world.
I'm trying to develop an application with the following modules(bundles):
model
services-api
default-services
web
Suppose the default-service bundle contains internal data access services.Therefore, it needs
some configuration for the database access.
It doesn't feel right to me to place the DB configuration within the default-services bundle.
Also, the web bundle should not know how the default-service is internally wired.
My question is: Does OSGi have a concept of configuration bundle? My idea was to deploy a bundle responsible for the default-service configuration. Is there a similar solution for that?
Have you looked at ConfigurationAdmin service? Your bundles should use ConfigurationAdmin to receive their configuration. If you use Declarative Services in your bundles, DS will automate the use of ConfigurationAdmin for you.
Depending on how you expect to do configuration, fragments may suit your needs. They allow you to add extra information to the existing bundles classpath. We use this to provide different configurations for different runtime environments (dev, test, ...). You simply deploy the appropriate fragment bundle to have the correct configuration.
I actually developed a little bundle that can detect configuration data in other bundles with the extender pattern. In my case this is a Jason file. Got some special tricks to handle passwords and binary files like ssl certificates.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I try to put variables from my PowerShell script into a MySQL database. I have no idea how to do this. I tried to google, but I could only find examples where the .Net framework needs to be installed.
Is there perhaps other possibilities that work without installation of MySQL on the client?
PowerShell isn't a massive monolithic all-encompassing language, that can do everything out-of-the-box.
It is lightweight and supports only (relatively) basic functionality by default, however it has modules to extend functionality and libraries to complete a wider range of tasks.
As Powershell is .NET based, it can use most .NET libraries.
MySQL connectivity is not native to PowerShell, and requires the use of the Connector/NET or CLI
Here's a blog post with some example Powershell code using the connector.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I've made a webpage on HTML and I want to run a .cpp application on it. With the way I've learnt to do it, the code is displayed.
The only way to do this is ActiveX, which by default is not supported by anything anymore. Only Internet Explorer supports it, but even that needs to be specifically allowed.
But you'd still have to first compile the cpp-code and do quite a huge amount of programming work before you'd have an valid ActiveX -dll. Then you'd also somehow need to deploy it for all website clients.
TL;DR: No, no no no. Running C/C++ for web clients is no-go.
However, if you are looking for something like that website client should be able to invoke a C++ application at the server, this is very possible. You still need to have that application compiled for the server environment though. For small "run and get the results" -tasks I've found it easiest to use ajax to call php -scripts, as php can execute stuff on server.
Signed Java Applets can run executables from browser, but it's not welcomed nowadays.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm completely new to Git, and one question I have that I cannot seem to find an answer to is this: when building a website is there any advantage to using private repositories vs public? I'm not referring to developing web-apps or other proprietary information so-to-speak, just basic web development. For example I would like to learn to use git (github) by updating our current website. Since source code is viewable to all, what advantages would be gained by using a private repository?
Thanks in advance!
If you are just developing in html/css/javascript(frontend), that is all viewable to the client. If you start to use server side scripting, (i.e PHP) you may have more sensitive data that you do not want public. You can also use git as a local repository and not have anything on github. That will handle source control and will all be kept local to the machine it is on. If you are developing on a server that other people use, they can also have access to edit that local repository.
Here is a good page for how to set up a local repository.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm having a frustrating time with Ruby. I've been working on developing a program that randomly generates a string from two arrays, which I'm all fine and dandy on that front. I'm fluent in the language. The problem I am having is with putting it online. I've been trying to figure out rails with no luck running my piece of software. Anyone able to help me along the way here? I'm unsure how to get this thing into a website for launch
Thanks in advance!
Sounds like Rails is overkill for this. If you only plan on having very simple actions, Sinatra might be better for you. http://www.sinatrarb.com/intro.html
After creating a simple API in Sinatra, you can then serve static assets (HTML, JS, CSS) where you can then use simple AJAX calls to hit your Sinatra backend.
You can get a Heroku account for free to host your application. Hosting a Sinatra application on Heroku should be pretty easy: http://blog.kuntz.co/2014/03/15/deploying-a-sinatra-app-to-heroku.html
You have a lot of options when it comes to deploying your web app.
A lot will depend on the scale of the application, budget and preference.
You will have mainly 2 main options.
Ready to use options
Ex. heroku, enginyard
Do it yourself options
Normal servers Ex. Digital ocean
After you make this decision you will find it way easier to deploy your app.
In case of heroku(its free I recommend it for start) reference this tutorial
If you do it on your own you will have to deiced which server will you use
Nginx, apache or others
Check out this
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
So I have a dependency, actually two dependencies to which I'd like to make changes either right now like fixing JBSEAM-3424 or potentially in the future. The coding is not an issue - I'm capable of making the change - and I'm not seeking to fork the community project, just to have a local version as recommended by Will Hartung to get some work done.
My concern is that issues of process will come up and bite me further down the line. So SO what can I do to ensure I manage this properly. What best practices are there?
Some more specific sub-questions:
Should I change the artifact names?
How choose group artifact and
version names?
Should I import the whole source tree
or be selective?
What if I can't get the build system
working in full - should I scale it
down or try to keep it close to the
original?
Should I change the artifact names?
How choose group artifact and version names?
Keep the groupId and artifactId of the module(s) you change the same, but use a qualifier on the version to ensure that it is obvious it is a non-standard version, for example 1.0.0-simon. This is pretty common practice.
Should I import the whole source tree or be selective?
Update based on your comment: Personally I'd only add the artifacts I've changed to my local source repository. If you change another artifact later then add it to your SCM then.
What if I can't get the build system working in full
Worry about that when it happens. If the project is built with Maven it should be straightforward for you to build only the artifacts you need. If it uses an uber-ant build which you can't get working with your changes, then consider paring the build down.