birenshah shahbiren

Greenhorn
+ Follow
since Feb 28, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by birenshah shahbiren

Thank you for quick response, however it will be really great if any of you can give me the way to write a java program, which returns a String value when jar is called from VBScript
I believe, only that class from executable jar will be called which contains main() method.

Below is the working syntax for VBScript calling jar file:
createobject("wscript.shell").run "java -jar vbcall.jar " & dbPassword & " CipherText ", 0, True

I am still wating for the response, on possibility of jar returning a String value?
12 years ago
Thanks Winston!

Writing it to a file is kind of last option, as jar file is going to return decrypted password.
Preference would be to store in cache or session.

Now the question arises, As application is not using any application/web server, is it possible to store thevalue in cache/session?
Second one, is registery a good option to store decypted password?
12 years ago
Hi All,

I have an executable jar, which is supposed to return a String value.
First of all, Is it possible?? If yes, how??

This jar will be called from VBScript program and I need the returned a string value to be used in VB Script.

Any help in this regrads will be appreciated.

Thanks,
Biren
12 years ago
Code To Call Jar file from VBScript:

createobject("wscript.shell").run "D:\jdk1.6.0_07\bin\java -jar vbcall.jar " & dbPassword & " CipherText ", 0, True
12 years ago

Hi,

I have very limited vba skills, however I have written a java programm to decrypt password & trying to make a call to this java program through .vbs file
I've gotten as far as finding the Shell command and running basic microsoft apps, however when I try to build the command line for the java call its not happy. Below is the code:

Sub testCall()
Dim retVal As Variant
retVal = createobject("wscript.shell").run "D:\itc\apps\eod\tan\fcr\SpoolReports\EXT\jdk1.6.0_07\bin\java -Xmx1570m TestProtector Password"
End Sub

Query is:
1. Is there anyway to return the decrypted password to vbscript from the java class?
2. How to call Java class from .vbs file, which returns the value

Any help would be fantastic.

Thanks,
Birem
12 years ago
Hi,

We are integrating FMS(Fault Management System) & IMS(Inventory Management System) using OSS/J APIs.
Architecture will be something like this:

FMS(Client) --> Client Adaptors --> OSSJImplementation --> Server Adaptor --> IMS(Server)
(event creator) (Mapping) (event listner)

We need help in creation of cleint/server adaptors, also the decision for choosing EJB/JVT or JMS/XML or WebServices for integration. Please let me know if any one has any clue in it.

Thanks,
Biren
Hi,

We are integrating FMS(Fault Management System) & IMS(Inventory Management System) using OSS/J APIs.
Architecture will be something like this:

FMS(Client) --> Client Adaptors --> OSSJImplementation --> Server Adaptor --> IMS(Server)
(event creator) (Mapping) (event listner)

We need help in creation of cleint/server adaptors, also the decision for choosing EJB/JVT or JMS/XML or WebServices for integration. Please let me know if any one has any clue in it.

Thanks,
Biren
13 years ago
On the close observation, I found PersistentReplicationManager does not exist.
I replaced it with PersistentManager, as shown below:

<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" expireSessionsOnShutdown="false" managerClassName="org.apache.catalina.cluster.session.PersistentReplicationManager" useDirtyFlag="true">

<Manager className="org.apache.catalina.session.PersistentManager" maxActiveSessions="-1" maxIdleBackup="0" maxIdleSwap="0" minIdleSwap="0">
<Store className="org.apache.catalina.session.FileStore" directory="C:/Apache Software Foundation/Tomcat 5.5/temp"/>
</Manager>
</Cluster>

Now the problem is managerClassName="org.apache.catalina.cluster.session.PersistentReplicationManager" also does not exist. If I remove this line, still the session info is not stored in file.

I am pasting server.xml

<?xml version="1.0" encoding="UTF-8"?>

<Server port="8005" shutdown="SHUTDOWN">

<Listener className="org.apache.catalina.core.AprLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>

<!-- Global JNDI resources -->
<GlobalNamingResources>

<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>

</GlobalNamingResources>

<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8080" redirectPort="8443"/>

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector enableLookups="false" port="8009" protocol="AJP/1.3" redirectPort="8443"/>

<!-- Define the top level container in our container hierarchy -->
<Engine defaultHost="localhost" jvmRoute="LoadBalancer" name="Catalina">

<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>


<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">


<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" expireSessionsOnShutdown="false" managerClassName="org.apache.catalina.cluster.session.PersistentReplicationManager" useDirtyFlag="true">

<Manager className="org.apache.catalina.session.PersistentManager" maxActiveSessions="-1" maxIdleBackup="0" maxIdleSwap="0" minIdleSwap="0">
<Store className="org.apache.catalina.session.FileStore" directory="C:/Apache Software Foundation/Tomcat 5.5/temp"/>
</Manager>

<Membership className="org.apache.catalina.cluster.mcast.McastService" mcastAddr="228.0.0.4" mcastBindAddress="127.0.0.1" mcastClusterDomain="d10" mcastDropTime="30000" mcastFrequency="500" mcastPort="45564"/>

<Receiver className="org.apache.catalina.cluster.tcp.ReplicationListener" tcpListenAddress="127.0.0.1" tcpListenPort="4000" tcpSelectorTimeout="100" tcpThreadCount="6"/>

<Sender className="org.apache.catalina.cluster.tcp.ReplicationTransmitter" replicationMode="pooled"/>

<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>

</Cluster>



<Context docBase="balancer" path="/balancer" reloadable="true" source="org.eclipse.jst.j2ee.server:balancer"/></Host>

</Engine>

</Service>

</Server>
13 years ago
Hi,

I have been trying to test Load balancing & Clustering with Tomcat5.5_16
Configured one LoadBalancer and three Cluster nodes.
Load balancer & cluster is working fine. I am facing a problem of session state persistence.

server.xml of Load balancer contains below tag:
<Manager className="org.apache.catalina.session.PersistentReplicationManager" debug="0" saveOnRestart="true">
<Store className="org.apache.catalina.session.FileStore" directory="D:\Software\JARFiles\Session"/>
</Manager>

There are no session info is getting stored at the directory location.

Thanks for help.
Biren

13 years ago
Got the solution.

Please use below tag in Master Node:
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer" deployDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/webapps" tempDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/temp" watchDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/watch" watchEnabled="true"/>

Please use below tag in Slave Nodes:
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer" deployDir="C:/TomcatInstances/Instance2/Apache Software Foundation/Tomcat 5.5/webapps" tempDir="C:/TomcatInstances/Instance2/Apache Software Foundation/Tomcat 5.5/temp" watchDir="C:/TomcatInstances/Instance2/Apache Software Foundation/Tomcat 5.5/webapps" watchEnabled="false"/>

Put your WAR file in watchDir of Master Node. Incase you are using Eclipse, please remove option of overriding default setting of tomcat by double clicking on newly created server.
Your WAR will be extracted in webapps directory of each & every node as soon as you put your WAR in watch directory & start all the nodes.

Regards,
Biren
14 years ago

Hi,

A small issue with FarmWarDeployer on Apache Tomcat 5.5.
I have two servers A & B

My deployer tag is as below for A.
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
deployDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/webapps"
tempDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/temp"
watchDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/watch"
watchEnabled="true"/> <!-- This is set to false on Server B-->

When I put WAR file in watchDir, it gets copied to all the nodes in the cluster, but application doesn't get deployed.
Moreover if I change watchDir = C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/webapps, application gets deployed only on the master server.

Suggestion please.

Thanks,
Biren
14 years ago
Nope..For tomcat this does not work. Any other suggetion please.
14 years ago