find all the ejbs deployed on weblogic application - ejb

I have a requirement to list all the ejbs and their jndi names that are currently deployed on an application running on weblogic 12 server.
Is there a way to get that information.
Thanks
gmk

All the tools you need to do this can be found in javax.naming.Context and friends.
In particular, look at javax.naming.Context.list(...) and javax.naming.Context.listBindings(...) methods.

Related

How to deploy Azure Fabric service on IIS?

I have developed a Azure Service Fabric service .Net core 2.2 which contains a controller and some API methods inside it. I deployed the service on local cluster and its working fine. I am able to access the api endpoints.
But now I need to deploy it on local IIS too. I published the service project that contains my controller, and when I try to deploy it on local IIS as we usually do while deployment of other apps, I get an error "HTTP Error 500.0 - ANCM In-Process Handler Load Failure". I am googling for this and trying to find solution but no success yet.
Is there any particular setting or process that needs to be followed to deploy Azure Service Fabric service on IIS ? I am unable to figure out what I am missing.
Any suggestions or ideas?
When you create a Service Fabric service, the runtime need to talk to the Service Fabric System Services at startup. If you deploy it to IIS, it does not have a cluster to talk to.
If you want to make an API flexible to be hosted either on Service Fabric or IIS, you need to decouple the hosting logic from the API.
In this case, you can either create two different hosts, or:
in the host entry point, check if you are running inside SF, if yes you start the Service Fabric Service otherwise you start a self-hosted or IIS version.
There are quite a few questions in SO with examples like this, worth a search to check which one fits your needs.

example stand alone application using EJB-MDB, eclipse, jetty server?

how to develop one example application using EJB-MDB, eclipse, jetty server?
I have created two java class. and i have .jar file, where I have to deploy .jar file in jetty server? after that what I have to do?
Your requirement for EJB-MDB seems to demand a full blown server like Jboss, Glassfish, TomEE and others. If you need jetty with the equivalent of EJB MDB functionality probably you should look at Spring-Boot. On the other hand if you need EJB/MDB compatibility you should probably choose an Application server and each of these comes with a plethora of examples and quickstarts, but each one comes with it's own Servlet Container respectively Undertow, Tomcat, Grizzly, but not Jetty.

Running ASP.Net server - Must be from visual studio?

I'm pretty new to ASP.Net and I've been having troubles understanding something.
I made a web application project with a web service on my computer.
I made another web application project, who then consumed the WSDL from the web service on the first project and uses a function in it.
I ran each on a different VS2012 Instance and when both projects are running in then there is no problem and it works fine.
When i close the VS Instance with the Web Service project then I get a Coonnection Error which is also logical.
My question:
Is there a way to keep the server running without keeping visual studio open?
There is no ".exe" generated or anything so I don't know what to run in order to keep the "Server" running..
Additional question if you don't mind:
If I want to use this service from another computer on the same Network, will the "localhost:.....?WSDL" service reference still work or do I need another address?
Sorry for my lack of knowledge, I just couldn't find a good guide explaining about how to keep the server running anywhere.
Thank you, Mellor.
Host your web service in localhost
use the computername instead of localhost in WSDL URL when you add services/web reference in cleint applications

Switching between azure/on-prem specific assemblies at runtime or pre-build based on config

I have a wcf web service which could be deployed to azure or on-prem.
I am trying to have a common code base for both scenarios but with different web.config for each sceanrio.
The problem is that when the wcf service is deployed on azure it needs to talk to azure cache instance and if deployed on prem it will talk to windows app fabric cache server.
the code to talk to both remains the same because they are the same caching product essentially.
However - if the wcf service is going to talk to azure cache then the project should have a reference to the following assemblies:
Microsoft.ApplicationServer.Caching.Core.dll (1.0.4817.0)
Microsoft.WindowsFabric.Common.dll (1.0.5627.0)
Microsoft.ApplicationServer.Caching.Client.dll (1.0.4817.0)
Microsoft.WindowsFabric.Data.Common.dll
Microsoft.ApplicationServer.Caching.AzureCommon.dll
Microsoft.ApplicationServer.Caching.AzureClientHelper.dll
If the code has to talk to app fabric on prem then the following assemblies have to be referenced.
Microsoft.ApplicationServer.Caching.Core.dll (1.0.4632.0)
Microsoft.WindowsFabric.Common.dll (1.0.4619.0)
Microsoft.ApplicationServer.Caching.Client.dll (1.0.4632.0)
Microsoft.WindowsFabric.Data.Common.dll
I am looking for a solution so that I can keep the same code base (.cs files and .csproj) and with a configuration switch in web.config it should refer to the right assemblies,
for example if 'UseAzure = 1' in web.config then the azure cache client side dlls should be referenced and loaded and if 'UseAzure = 0' then AF on-Prem dlls should be loaded.
I am wondering if this is possible using run time C# code or via a visual studio pre/post build task.
I am open to any other ideas to acheive this.
Could someone confirm on the feasability of these two options and if so point me to some code which does something similar.

BizTalk server 2006 R2 not using recently "GAC"ced dll

I have a DLL which is GAC'ced (c:\windows\assembly) which is being used by my Biztalk Application, for some requirement, I changed a function in that DLL and:
I uninstalled the old DLL which was in GAC (version 1.0.0.0)
I GAC'ced the newly built DLL into GAC (version 1.0.0.0)
I also restarted the BizTalk Host Instances.
But still the output seems to be from the old DLL's function. I am not getting the problem, why still I am getting the old output.
Can anybody help me?
Some tips that might be helpful:
(1) If you have multiple BizTalk servers in your group, be sure to update all of the servers!
Depending on your host instance configuration, your instance may run on any server the host instance is active on.
(2) Make sure you restart the correct biztalk host instance. This is often overlooked. Don't forget about the BizTalk Isolated Host! Perform a recycle of the specific IIS application pool if necessary. If you are unsure, perform an iisreset.exe
(3) To update a DLL in BizTalk it is often necessary to update it in the BizTalk database as well. For some changes it may work just updating the DLL in the GAC, but often I find that this is not enough (especially with orchestrations).
What you are describing here is correct. You should see the new DLL taking over. A couple things to check:
Did you recycle the correct host instances?
Did you recylce the host instances on all servers?
Did you veriiify the Create date on the GAC'd DLL to ensure the new one was installed?
Another issue might be based on what you changed in the Application. You can only Gac/Restart under particular circumstances. See this When can you just re-gac and re-start on Jon Flander's blog for reference.
If you want to be really sure that the correct assembly that has been GAC:ed, click "Run" and type "%systemroot%\assembly\gac" for .Net 1.1 or "%systemroot%\assembly\gac_msil" for > 2.0.
There you have the physical files for each version number to be checked (or overwrited).
It might help us support you if you let us know what part of BizTalk you are using the assembly, pipeline, functoid, schema etc.
Is that DLL used under a BizTalk process (BTSNTSvc.exe) or by an Isolated Host Instance?
If this DLL is used in a Receive Location which Receive Handler (Host) is Isolated, for example a SOAP Receive Location, you have to restart the Application pool from IIS and not the Host Instance.

Resources