├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── Mutual_Exclusion(Java) ├── build.xml ├── build │ └── classes │ │ ├── .netbeans_automatic_build │ │ ├── .netbeans_update_resources │ │ └── cent │ │ └── Cent.class ├── lib │ ├── CopyLibs │ │ └── org-netbeans-modules-java-j2seproject-copylibstask.jar │ └── nblibraries.properties ├── manifest.mf ├── mutex │ ├── build.xml │ ├── build │ │ └── classes │ │ │ ├── .netbeans_automatic_build │ │ │ ├── .netbeans_update_resources │ │ │ └── mutex │ │ │ └── Mutex.class │ ├── lib │ │ ├── CopyLibs │ │ │ └── org-netbeans-modules-java-j2seproject-copylibstask.jar │ │ └── nblibraries.properties │ ├── manifest.mf │ ├── nbproject │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── private │ │ │ ├── private.properties │ │ │ └── private.xml │ │ ├── project.properties │ │ └── project.xml │ └── src │ │ └── mutex │ │ └── Mutex.java ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ └── private.properties │ ├── project.properties │ └── project.xml └── src │ └── cent │ └── Cent.java ├── Mutual_Exclusion(c++) ├── mutual_exclusion.cpp ├── mutual_exclusion.exe ├── mutual_exclusion.o ├── mutual_exclusions.cpp ├── mutual_exclusions.exe ├── mutual_exclusions.o └── mutual_op.PNG ├── README.md ├── bankersalgo ├── build.xml ├── build │ └── classes │ │ ├── .netbeans_automatic_build │ │ ├── .netbeans_update_resources │ │ └── bankersalgo │ │ └── Bankersalgo.class ├── lib │ ├── CopyLibs │ │ └── org-netbeans-modules-java-j2seproject-copylibstask.jar │ └── nblibraries.properties ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ └── bankersalgo │ └── Bankersalgo.java ├── bully ├── build.xml ├── build │ └── classes │ │ ├── .netbeans_automatic_build │ │ ├── .netbeans_update_resources │ │ └── bully │ │ └── Bully.class ├── lib │ ├── CopyLibs │ │ └── org-netbeans-modules-java-j2seproject-copylibstask.jar │ └── nblibraries.properties ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ └── bully │ └── Bully.java ├── calculator ├── build.xml ├── build │ └── classes │ │ ├── .netbeans_automatic_build │ │ ├── .netbeans_update_resources │ │ └── calculator │ │ ├── Calculator.class │ │ ├── calculatorclient.class │ │ ├── calculatorinterface.class │ │ └── calculatorserver.class ├── lib │ ├── CopyLibs │ │ └── org-netbeans-modules-java-j2seproject-copylibstask.jar │ └── nblibraries.properties ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ └── calculator │ ├── Calculator.java │ ├── calculatorclient.java │ ├── calculatorinterface.java │ └── calculatorserver.java ├── ejbcalc ├── build.xml ├── build │ ├── META-INF │ │ └── MANIFEST.MF │ ├── ejbcalc-ejb.jar │ ├── ejbcalc-war.war │ └── gfv3ee6.dpf ├── dist │ ├── ejbcalc.ear │ └── gfdeploy │ │ └── ejbcalc │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ ├── ejbcalc-ejb_jar │ │ ├── .netbeans_automatic_build │ │ ├── .netbeans_update_resources │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ └── test │ │ │ └── operation.class │ │ └── ejbcalc-war_war │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ ├── WEB-INF │ │ ├── classes │ │ │ ├── .netbeans_automatic_build │ │ │ ├── .netbeans_update_resources │ │ │ └── result.class │ │ └── web.xml │ │ └── index.jsp ├── ejbcalc-ejb │ ├── build.xml │ ├── build │ │ └── classes │ │ │ ├── .netbeans_automatic_build │ │ │ ├── .netbeans_update_resources │ │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ │ └── test │ │ │ └── operation.class │ ├── dist │ │ └── ejbcalc-ejb.jar │ ├── nbproject │ │ ├── ant-deploy.xml │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── private │ │ │ ├── private.properties │ │ │ └── private.xml │ │ ├── project.properties │ │ └── project.xml │ └── src │ │ ├── conf │ │ └── MANIFEST.MF │ │ └── java │ │ └── test │ │ └── operation.java ├── ejbcalc-war │ ├── build.xml │ ├── build │ │ └── web │ │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ │ ├── WEB-INF │ │ │ ├── classes │ │ │ │ ├── .netbeans_automatic_build │ │ │ │ ├── .netbeans_update_resources │ │ │ │ └── result.class │ │ │ └── web.xml │ │ │ └── index.jsp │ ├── dist │ │ └── ejbcalc-war.war │ ├── nbproject │ │ ├── ant-deploy.xml │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── private │ │ │ ├── private.properties │ │ │ └── private.xml │ │ ├── project.properties │ │ └── project.xml │ ├── src │ │ ├── conf │ │ │ └── MANIFEST.MF │ │ └── java │ │ │ └── result.java │ └── web │ │ ├── WEB-INF │ │ └── web.xml │ │ └── index.jsp ├── lib │ ├── CopyLibs │ │ └── org-netbeans-modules-java-j2seproject-copylibstask.jar │ ├── javaee-endorsed-api-7.0 │ │ ├── javaee-doc-api.jar │ │ ├── javax.annotation-api.jar │ │ ├── javax.xml.soap-api.jar │ │ ├── jaxb-api-osgi.jar │ │ ├── jaxws-api.jar │ │ └── jsr181-api.jar │ └── nblibraries.properties ├── nbproject │ ├── ant-deploy.xml │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml └── src │ └── conf │ └── MANIFEST.MF └── rmilogin └── calculator ├── build.xml ├── build └── classes │ ├── .netbeans_automatic_build │ ├── .netbeans_update_resources │ └── calculator │ ├── Calculator.class │ ├── calculatorclient.class │ ├── calculatorinterface.class │ └── calculatorserver.class ├── lib ├── CopyLibs │ └── org-netbeans-modules-java-j2seproject-copylibstask.jar └── nblibraries.properties ├── manifest.mf ├── nbproject ├── build-impl.xml ├── genfiles.properties ├── private │ ├── private.properties │ └── private.xml ├── project.properties └── project.xml └── src └── calculator ├── Calculator.java ├── calculatorclient.java ├── calculatorinterface.java └── calculatorserver.java /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Desktop (please complete the following information):** 24 | - OS: [e.g. iOS] 25 | - Browser [e.g. chrome, safari] 26 | - Version [e.g. 22] 27 | 28 | **Smartphone (please complete the following information):** 29 | - Device: [e.g. iPhone6] 30 | - OS: [e.g. iOS8.1] 31 | - Browser [e.g. stock browser, safari] 32 | - Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project cent. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/build/classes/cent/Cent.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/build/classes/cent/Cent.class -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/lib/nblibraries.properties: -------------------------------------------------------------------------------- 1 | libs.CopyLibs.classpath=\ 2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar 3 | libs.CopyLibs.displayName=CopyLibs Task 4 | libs.CopyLibs.prop-version=2.0 5 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project mutex. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/mutex/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/mutex/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/build/classes/mutex/Mutex.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/mutex/build/classes/mutex/Mutex.class -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/Mutual_Exclusion(Java)/mutex/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/lib/nblibraries.properties: -------------------------------------------------------------------------------- 1 | libs.CopyLibs.classpath=\ 2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar 3 | libs.CopyLibs.displayName=CopyLibs Task 4 | libs.CopyLibs.prop-version=2.0 5 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=58545b7e 2 | build.xml.script.CRC32=d9e36fa3 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=58545b7e 7 | nbproject/build-impl.xml.script.CRC32=5821450a 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 3 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | file:/C:/Users/prasad/Documents/NetBeansProjects/mutex/src/mutex/Mutex.java 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/mutex.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | includes=** 31 | jar.compress=false 32 | javac.classpath= 33 | # Space-separated list of extra javac options 34 | javac.compilerargs= 35 | javac.deprecation=false 36 | javac.external.vm=true 37 | javac.processorpath=\ 38 | ${javac.classpath} 39 | javac.source=1.8 40 | javac.target=1.8 41 | javac.test.classpath=\ 42 | ${javac.classpath}:\ 43 | ${build.classes.dir} 44 | javac.test.processorpath=\ 45 | ${javac.test.classpath} 46 | javadoc.additionalparam= 47 | javadoc.author=false 48 | javadoc.encoding=${source.encoding} 49 | javadoc.noindex=false 50 | javadoc.nonavbar=false 51 | javadoc.notree=false 52 | javadoc.private=false 53 | javadoc.splitindex=true 54 | javadoc.use=true 55 | javadoc.version=false 56 | javadoc.windowtitle= 57 | main.class=mutex.Mutex 58 | manifest.file=manifest.mf 59 | meta.inf.dir=${src.dir}/META-INF 60 | mkdist.disabled=false 61 | platform.active=default_platform 62 | run.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | # Space-separated list of JVM arguments used when running the project. 66 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 67 | # To set system properties for unit tests define test-sys-prop.name=value: 68 | run.jvmargs= 69 | run.test.classpath=\ 70 | ${javac.test.classpath}:\ 71 | ${build.test.classes.dir} 72 | source.encoding=UTF-8 73 | src.dir=src 74 | test.src.dir=test 75 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | mutex 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | .\lib\nblibraries.properties 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/mutex/src/mutex/Mutex.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package mutex; 7 | import java.util.*; 8 | /** 9 | * 10 | * @author prasad 11 | */ 12 | public class Mutex { 13 | 14 | /** 15 | * @param args the command line arguments 16 | */ 17 | public static void main(String[] args) { 18 | // TODO code application logic here 19 | Scanner sc = new Scanner(System.in); 20 | int opt0,opt1; 21 | int p1 = 1; 22 | int p2 = 2; 23 | int p3 = 3; 24 | int flag = 0; 25 | int cs = 0; 26 | Queue q = new LinkedList<>(); 27 | do 28 | { 29 | System.out.println("....menu..."); 30 | System.out.println("1.Request the critical section"); 31 | System.out.println("2.Release the critical section"); 32 | System.out.println("3.Exit"); 33 | opt0 = sc.nextInt(); 34 | switch(opt0) 35 | { 36 | case 1: 37 | { 38 | System.out.println("Select the process."); 39 | System.out.println("1.p1"); 40 | System.out.println("2.p2"); 41 | System.out.println("3.p3"); 42 | opt1 = sc.nextInt(); 43 | switch(opt1) 44 | { 45 | case 1: 46 | { 47 | if(flag==0) 48 | { 49 | cs = 1; 50 | flag = 1; 51 | } 52 | else 53 | { 54 | System.out.println("process p"+cs+"is already in critical section."); 55 | q.add(p1); 56 | } 57 | 58 | System.out.println("System Status:"); 59 | System.out.println("critical section is occupoied by:"+cs); 60 | System.out.println("process waiting is: "+q); 61 | break; 62 | } 63 | case 2: 64 | { 65 | if(flag==0) 66 | { 67 | cs = 2; 68 | flag = 1; 69 | } 70 | else 71 | { 72 | System.out.println("process p"+cs+"is already in critical section."); 73 | q.add(p2); 74 | } 75 | System.out.println("System Status:"); 76 | System.out.println("critical section is occupoied by:"+cs); 77 | System.out.println("process waiting is: "+q); 78 | break; 79 | } 80 | case 3: 81 | { 82 | if(flag==0) 83 | { 84 | cs = 3; 85 | flag = 1; 86 | } 87 | else 88 | { 89 | System.out.println("process p"+cs+"is already in critical section."); 90 | q.add(p3); 91 | } 92 | System.out.println("System Status:"); 93 | System.out.println("critical section is occupoied by:"+cs); 94 | System.out.println("process waiting is: "+q); 95 | break; 96 | } 97 | } 98 | break; 99 | } 100 | case 2: 101 | { 102 | System.out.println("the process p"+cs+"is removed from section."); 103 | if(!q.isEmpty()) 104 | { 105 | cs = q.peek(); 106 | q.remove(); 107 | System.out.println("System status:"); 108 | System.out.println("Critical Section occupied by p"+cs); 109 | } 110 | else 111 | { 112 | System.out.println("No Process is waiting in the queue"); 113 | flag = 0; 114 | } 115 | } 116 | 117 | case 3: 118 | { 119 | break; 120 | } 121 | } 122 | } 123 | while(3!=opt0); 124 | } 125 | 126 | } 127 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=09421fd1 2 | build.xml.script.CRC32=77fca5f3 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=09421fd1 7 | nbproject/build-impl.xml.script.CRC32=9831a59e 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 3 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/cent.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | includes=** 31 | jar.compress=false 32 | javac.classpath= 33 | # Space-separated list of extra javac options 34 | javac.compilerargs= 35 | javac.deprecation=false 36 | javac.external.vm=true 37 | javac.processorpath=\ 38 | ${javac.classpath} 39 | javac.source=1.8 40 | javac.target=1.8 41 | javac.test.classpath=\ 42 | ${javac.classpath}:\ 43 | ${build.classes.dir} 44 | javac.test.processorpath=\ 45 | ${javac.test.classpath} 46 | javadoc.additionalparam= 47 | javadoc.author=false 48 | javadoc.encoding=${source.encoding} 49 | javadoc.noindex=false 50 | javadoc.nonavbar=false 51 | javadoc.notree=false 52 | javadoc.private=false 53 | javadoc.splitindex=true 54 | javadoc.use=true 55 | javadoc.version=false 56 | javadoc.windowtitle= 57 | main.class=cent.Cent 58 | manifest.file=manifest.mf 59 | meta.inf.dir=${src.dir}/META-INF 60 | mkdist.disabled=false 61 | platform.active=default_platform 62 | run.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | # Space-separated list of JVM arguments used when running the project. 66 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 67 | # To set system properties for unit tests define test-sys-prop.name=value: 68 | run.jvmargs= 69 | run.test.classpath=\ 70 | ${javac.test.classpath}:\ 71 | ${build.test.classes.dir} 72 | source.encoding=UTF-8 73 | src.dir=src 74 | test.src.dir=test 75 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | cent 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | .\lib\nblibraries.properties 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Mutual_Exclusion(Java)/src/cent/Cent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package cent; 7 | 8 | /** 9 | * 10 | * @author prasad 11 | */ 12 | public class Cent { 13 | 14 | /** 15 | * @param args the command line arguments 16 | */ 17 | 18 | public int flag=0; 19 | public int front=0; 20 | public int rear=-1; 21 | public boolean grant; 22 | 23 | int[] queue=new int[10]; 24 | public void request(int p) 25 | { 26 | 27 | if(flag==0) 28 | { 29 | System.out.println("reply to"+p); 30 | flag=1; 31 | } 32 | else 33 | { 34 | if(flag==1) 35 | { 36 | System.out.println("process wait "+p); 37 | rear++; 38 | queue[rear]=p; 39 | } 40 | } 41 | 42 | } 43 | 44 | public void release(int p) 45 | { 46 | flag=0; 47 | if(queue[front]!=0) 48 | { 49 | System.out.println("delete from queue"+queue[front]); 50 | request(queue[front]); 51 | front=front+1; 52 | System.out.println("released"+p); 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | 60 | public static void main(String[] args) { 61 | // TODO code application logic here 62 | int p = 5; 63 | Cent c = new Cent(); 64 | c.request(p); 65 | c.request(6); 66 | c.request(7); 67 | c.release(p); 68 | c.release(6); 69 | 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /Mutual_Exclusion(c++)/mutual_exclusion.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | // your code goes here 6 | int m; // no of commands 7 | int n; // no of process 8 | int r; // no of resources 9 | int c; //co-ordinator process 10 | int req; // no request for resource 11 | int rid; // request id 12 | int pid; // process id 13 | int rrid; // release resource id 14 | int prid; // release process id 15 | int choice; //choice for options 16 | queue p; // queue for processes 17 | //queue r; // queue for resources 18 | //queue w; //waiting queue 19 | //stack q; // process in cs 20 | cout<<"*******MENU***********"<<'\n'; 21 | cout<<"enter the no of process:"<>n; 23 | //cout<<"enter the no of resources:"<>r; 25 | cout<<"enter the co-ordinator process:"<>c; 27 | cout<<"enter the no of commands:"<>m; 29 | bool cs = true; 30 | while(m--) 31 | { 32 | cout<<"choice menu:-"<>choice; 38 | bool nc = false; 39 | int allocated = 0; 40 | if(choice==1) 41 | { 42 | //request goes here 43 | cout<<"Process id:"<>pid; 45 | if(cs==true) 46 | { 47 | cs = false; 48 | allocated = pid; 49 | cout<<"Resource is Granted for-"<>prid; 63 | if(allocated==prid) 64 | { 65 | cs = true; 66 | cout<<"Critical Section is released by-"< 2 | using namespace std; 3 | 4 | int main() { 5 | // your code goes here 6 | int m; // no of commands 7 | int n; // no of process 8 | int r; // no of resources 9 | int c; //co-ordinator process 10 | int req; // no request for resource 11 | int rid; // request id 12 | int pid; // process id 13 | int rrid; // release resource id 14 | int prid; // release process id 15 | int choice; //choice for options 16 | queue p; // queue for processes 17 | //queue r; // queue for resources 18 | //queue w; //waiting queue 19 | //stack q; // process in cs 20 | cout<<"*******MENU***********"<<'\n'; 21 | cout<<"enter the no of process:"<>n; 23 | //cout<<"enter the no of resources:"<>r; 25 | cout<<"enter the co-ordinator process:"<>c; 27 | cout<<"enter the no of commands:"<>m; 29 | bool cs = true; 30 | while(m--) 31 | { 32 | cout<<"choice menu:-"<>choice; 38 | bool nc = false; 39 | int allocated = 0; 40 | if(choice==1) 41 | { 42 | //request goes here 43 | cout<<"Process id:"<>pid; 45 | if(cs==true) 46 | { 47 | cs = false; 48 | allocated = pid; 49 | cout<<"Resource is Granted for-"<>prid; 63 | if(allocated==prid) 64 | { 65 | cs = true; 66 | cout<<"Critical Section is released by-"< 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project bankersalgo. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /bankersalgo/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bankersalgo/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /bankersalgo/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bankersalgo/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /bankersalgo/build/classes/bankersalgo/Bankersalgo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bankersalgo/build/classes/bankersalgo/Bankersalgo.class -------------------------------------------------------------------------------- /bankersalgo/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bankersalgo/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -------------------------------------------------------------------------------- /bankersalgo/lib/nblibraries.properties: -------------------------------------------------------------------------------- 1 | libs.CopyLibs.classpath=\ 2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar 3 | libs.CopyLibs.displayName=CopyLibs Task 4 | libs.CopyLibs.prop-version=2.0 5 | -------------------------------------------------------------------------------- /bankersalgo/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /bankersalgo/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=6f4e7e74 2 | build.xml.script.CRC32=ec2c682e 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=6f4e7e74 7 | nbproject/build-impl.xml.script.CRC32=09af1b9e 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /bankersalgo/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 3 | -------------------------------------------------------------------------------- /bankersalgo/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/prasad/Documents/NetBeansProjects/bankersalgo/src/bankersalgo/Bankersalgo.java 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bankersalgo/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/bankersalgo.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | includes=** 31 | jar.compress=false 32 | javac.classpath= 33 | # Space-separated list of extra javac options 34 | javac.compilerargs= 35 | javac.deprecation=false 36 | javac.external.vm=true 37 | javac.processorpath=\ 38 | ${javac.classpath} 39 | javac.source=1.8 40 | javac.target=1.8 41 | javac.test.classpath=\ 42 | ${javac.classpath}:\ 43 | ${build.classes.dir} 44 | javac.test.processorpath=\ 45 | ${javac.test.classpath} 46 | javadoc.additionalparam= 47 | javadoc.author=false 48 | javadoc.encoding=${source.encoding} 49 | javadoc.noindex=false 50 | javadoc.nonavbar=false 51 | javadoc.notree=false 52 | javadoc.private=false 53 | javadoc.splitindex=true 54 | javadoc.use=true 55 | javadoc.version=false 56 | javadoc.windowtitle= 57 | main.class=bankersalgo.Bankersalgo 58 | manifest.file=manifest.mf 59 | meta.inf.dir=${src.dir}/META-INF 60 | mkdist.disabled=false 61 | platform.active=default_platform 62 | run.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | # Space-separated list of JVM arguments used when running the project. 66 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 67 | # To set system properties for unit tests define test-sys-prop.name=value: 68 | run.jvmargs= 69 | run.test.classpath=\ 70 | ${javac.test.classpath}:\ 71 | ${build.test.classes.dir} 72 | source.encoding=UTF-8 73 | src.dir=src 74 | test.src.dir=test 75 | -------------------------------------------------------------------------------- /bankersalgo/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | bankersalgo 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | .\lib\nblibraries.properties 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bankersalgo/src/bankersalgo/Bankersalgo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package bankersalgo; 7 | 8 | /** 9 | * 10 | * @author prasad 11 | */ 12 | 13 | import java.util.Scanner; 14 | 15 | public class Bankersalgo { 16 | 17 | /** 18 | * @param args the command line arguments 19 | */ 20 | int max[][]; 21 | 22 | int need[][]; 23 | 24 | int available[][]; 25 | 26 | int allocation[][]; 27 | 28 | int np,nr; 29 | 30 | 31 | 32 | public void input(){ 33 | 34 | Scanner input=new Scanner(System.in); 35 | 36 | System.out.println("Enter no. of Process and no. of Resource "); 37 | 38 | np=input.nextInt(); 39 | 40 | nr=input.nextInt(); 41 | 42 | max=new int[np][nr]; 43 | 44 | need=new int[np][nr]; 45 | 46 | available=new int[1][nr]; 47 | 48 | allocation=new int[np][nr]; 49 | 50 | 51 | 52 | System.out.println("Enter Allocation Matrix"); 53 | 54 | for(int i=0;i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project bully. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /bully/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bully/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /bully/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bully/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /bully/build/classes/bully/Bully.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bully/build/classes/bully/Bully.class -------------------------------------------------------------------------------- /bully/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/bully/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -------------------------------------------------------------------------------- /bully/lib/nblibraries.properties: -------------------------------------------------------------------------------- 1 | libs.CopyLibs.classpath=\ 2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar 3 | libs.CopyLibs.displayName=CopyLibs Task 4 | libs.CopyLibs.prop-version=2.0 5 | -------------------------------------------------------------------------------- /bully/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /bully/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=a2cb384a 2 | build.xml.script.CRC32=66f4d565 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=a2cb384a 7 | nbproject/build-impl.xml.script.CRC32=8714dc0b 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /bully/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 3 | -------------------------------------------------------------------------------- /bully/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/prasad/Documents/NetBeansProjects/bully/src/bully/Bully.java 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bully/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/bully.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | includes=** 31 | jar.compress=false 32 | javac.classpath= 33 | # Space-separated list of extra javac options 34 | javac.compilerargs= 35 | javac.deprecation=false 36 | javac.external.vm=true 37 | javac.processorpath=\ 38 | ${javac.classpath} 39 | javac.source=1.8 40 | javac.target=1.8 41 | javac.test.classpath=\ 42 | ${javac.classpath}:\ 43 | ${build.classes.dir} 44 | javac.test.processorpath=\ 45 | ${javac.test.classpath} 46 | javadoc.additionalparam= 47 | javadoc.author=false 48 | javadoc.encoding=${source.encoding} 49 | javadoc.noindex=false 50 | javadoc.nonavbar=false 51 | javadoc.notree=false 52 | javadoc.private=false 53 | javadoc.splitindex=true 54 | javadoc.use=true 55 | javadoc.version=false 56 | javadoc.windowtitle= 57 | main.class=bully.Bully 58 | manifest.file=manifest.mf 59 | meta.inf.dir=${src.dir}/META-INF 60 | mkdist.disabled=false 61 | platform.active=default_platform 62 | run.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | # Space-separated list of JVM arguments used when running the project. 66 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 67 | # To set system properties for unit tests define test-sys-prop.name=value: 68 | run.jvmargs= 69 | run.test.classpath=\ 70 | ${javac.test.classpath}:\ 71 | ${build.test.classes.dir} 72 | source.encoding=UTF-8 73 | src.dir=src 74 | test.src.dir=test 75 | -------------------------------------------------------------------------------- /bully/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | bully 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | .\lib\nblibraries.properties 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bully/src/bully/Bully.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package bully; 7 | 8 | import java.util.Scanner; 9 | 10 | /** 11 | * 12 | * @author prasad 13 | */ 14 | public class Bully { 15 | 16 | /** 17 | * @param args the command line arguments 18 | */ 19 | static boolean state[] = new boolean[5]; 20 | int coordinator; 21 | public static void up(int up) 22 | { 23 | if(state[up-1]==true) 24 | { 25 | System.out.println("process"+up+"is already up"); 26 | } 27 | else 28 | { 29 | state[up-1] = true; 30 | System.out.println("process "+up+"held election"); 31 | for(int i=up;i<5;i++) 32 | { 33 | System.out.println("election message sent from process"+up+"to process"+(i+1)); 34 | } 35 | for(int i=up+1;i<=5;i++) 36 | { 37 | if(state[i-1]==true) 38 | { 39 | System.out.println("alive message send from process"+i+"to process"+up); 40 | break; 41 | } 42 | } 43 | } 44 | } 45 | public static void down(int down) 46 | { 47 | if(state[down-1]==false) 48 | { 49 | System.out.println("process "+down+"is already dowm."); 50 | } 51 | else 52 | { 53 | state[down-1] = false; 54 | 55 | } 56 | } 57 | 58 | public static void mess(int mess) 59 | { 60 | if(state[mess-1]==true) 61 | { 62 | if(state[4]==true) 63 | { 64 | System.out.println("0K"); 65 | } 66 | else 67 | { 68 | if(state[4]==false) 69 | { 70 | System.out.println("process"+mess+"election"); 71 | for(int i=mess;i<5;i++) 72 | { 73 | System.out.println("election send from process"+mess+"to process "+(i+1)); 74 | } 75 | 76 | for(int i=5;i>=mess;i--) 77 | { 78 | if(state[i-1]==true) 79 | { 80 | System.out.println("Coordinator message send from process"+i+"to all"); 81 | break; 82 | } 83 | } 84 | } 85 | } 86 | } 87 | else 88 | { 89 | System.out.println("Prccess"+mess+"is down"); 90 | } 91 | } 92 | 93 | public static void main(String[] args) { 94 | // TODO code application logic here 95 | Scanner sc = new Scanner(System.in); 96 | int choice; 97 | for(int i=0;i<5;i++) 98 | { 99 | state[i] = true; 100 | } 101 | System.out.println("5 active process are:"); 102 | System.out.println("Process up = p1 p2 p3 p4 p5"); 103 | System.out.println("Process 5 is coordinator"); 104 | 105 | do 106 | { 107 | System.out.println("........."); 108 | System.out.println("1 up a process."); 109 | System.out.println("2.down a process"); 110 | System.out.println("3 send a message"); 111 | System.out.println("4.Exit"); 112 | choice = sc.nextInt(); 113 | switch(choice) 114 | { 115 | case 1: 116 | { 117 | System.out.println("bring proces up"); 118 | int up = sc.nextInt(); 119 | if(up==5) 120 | { 121 | System.out.println("process 5 is co-ordinator"); 122 | state[4] = true; 123 | 124 | } 125 | else 126 | { 127 | up(up); 128 | } 129 | } 130 | break; 131 | case 2: 132 | { 133 | System.out.println("bring down any process."); 134 | int down = sc.nextInt(); 135 | down(down); 136 | } 137 | break; 138 | case 3: 139 | { 140 | System.out.println("which process will send message"); 141 | int mess = sc.nextInt(); 142 | mess(mess); 143 | } 144 | break; 145 | 146 | } 147 | 148 | } 149 | while(choice!=4); 150 | } 151 | 152 | } 153 | -------------------------------------------------------------------------------- /calculator/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project calculator. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /calculator/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/calculator/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /calculator/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/calculator/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /calculator/build/classes/calculator/Calculator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/calculator/build/classes/calculator/Calculator.class -------------------------------------------------------------------------------- /calculator/build/classes/calculator/calculatorclient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/calculator/build/classes/calculator/calculatorclient.class -------------------------------------------------------------------------------- /calculator/build/classes/calculator/calculatorinterface.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/calculator/build/classes/calculator/calculatorinterface.class -------------------------------------------------------------------------------- /calculator/build/classes/calculator/calculatorserver.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/calculator/build/classes/calculator/calculatorserver.class -------------------------------------------------------------------------------- /calculator/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/calculator/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -------------------------------------------------------------------------------- /calculator/lib/nblibraries.properties: -------------------------------------------------------------------------------- 1 | libs.CopyLibs.classpath=\ 2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar 3 | libs.CopyLibs.displayName=CopyLibs Task 4 | libs.CopyLibs.prop-version=2.0 5 | -------------------------------------------------------------------------------- /calculator/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /calculator/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=86638026 2 | build.xml.script.CRC32=7618ae60 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=86638026 7 | nbproject/build-impl.xml.script.CRC32=ce151cdc 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /calculator/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 3 | -------------------------------------------------------------------------------- /calculator/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/prasad/Documents/NetBeansProjects/calculator/src/calculator/Calculator.java 7 | file:/C:/Users/prasad/Documents/NetBeansProjects/calculator/src/calculator/calculatorclient.java 8 | file:/C:/Users/prasad/Documents/NetBeansProjects/calculator/src/calculator/calculatorinterface.java 9 | file:/C:/Users/prasad/Documents/NetBeansProjects/calculator/src/calculator/calculatorserver.java 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /calculator/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/calculator.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | includes=** 31 | jar.compress=false 32 | javac.classpath= 33 | # Space-separated list of extra javac options 34 | javac.compilerargs= 35 | javac.deprecation=false 36 | javac.external.vm=true 37 | javac.processorpath=\ 38 | ${javac.classpath} 39 | javac.source=1.8 40 | javac.target=1.8 41 | javac.test.classpath=\ 42 | ${javac.classpath}:\ 43 | ${build.classes.dir} 44 | javac.test.processorpath=\ 45 | ${javac.test.classpath} 46 | javadoc.additionalparam= 47 | javadoc.author=false 48 | javadoc.encoding=${source.encoding} 49 | javadoc.noindex=false 50 | javadoc.nonavbar=false 51 | javadoc.notree=false 52 | javadoc.private=false 53 | javadoc.splitindex=true 54 | javadoc.use=true 55 | javadoc.version=false 56 | javadoc.windowtitle= 57 | main.class=calculator.Calculator 58 | manifest.file=manifest.mf 59 | meta.inf.dir=${src.dir}/META-INF 60 | mkdist.disabled=false 61 | platform.active=default_platform 62 | run.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | # Space-separated list of JVM arguments used when running the project. 66 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 67 | # To set system properties for unit tests define test-sys-prop.name=value: 68 | run.jvmargs= 69 | run.test.classpath=\ 70 | ${javac.test.classpath}:\ 71 | ${build.test.classes.dir} 72 | source.encoding=UTF-8 73 | src.dir=src 74 | test.src.dir=test 75 | -------------------------------------------------------------------------------- /calculator/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | calculator 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | .\lib\nblibraries.properties 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /calculator/src/calculator/Calculator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | import java.rmi.RemoteException; 8 | import java.rmi.*; 9 | import java.rmi.server.UnicastRemoteObject; 10 | /** 11 | * 12 | * @author prasad 13 | */ 14 | public class Calculator extends UnicastRemoteObject implements calculatorinterface{ 15 | 16 | public Calculator() throws RemoteException 17 | { 18 | int a,b; 19 | } 20 | @Override 21 | public int add(int a,int b) throws RemoteException 22 | { 23 | return a+b; 24 | } 25 | @Override 26 | public int sub(int a,int b) throws RemoteException 27 | { 28 | return a-b; 29 | } 30 | @Override 31 | public int mul(int a,int b) throws RemoteException 32 | { 33 | return a*b; 34 | } 35 | @Override 36 | public int div(int a,int b) throws RemoteException 37 | { 38 | return a/b; 39 | } 40 | 41 | /** 42 | * @param args the command line arguments 43 | */ 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /calculator/src/calculator/calculatorclient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | 8 | import java.net.MalformedURLException; 9 | import java.rmi.Naming; 10 | import java.rmi.NotBoundException; 11 | import java.rmi.RemoteException; 12 | import java.util.Scanner; 13 | 14 | /** 15 | * 16 | * @author prasad 17 | */ 18 | public class calculatorclient { 19 | public static void main(String[] args) throws NotBoundException,RemoteException, MalformedURLException { 20 | // TODO code application logic here 21 | Scanner sc = new Scanner(System.in); 22 | try 23 | { 24 | calculatorinterface c = (calculatorinterface) Naming.lookup("//localhost:1090/Calculator"); 25 | System.out.println("client is connected to server"); 26 | System.out.println("select any option from menu"); 27 | System.out.println("1.addition \n"); 28 | System.out.println("2.Substraction \n"); 29 | System.out.println("3.Multiplication \n"); 30 | System.out.println("4.Division \n"); 31 | int choice = sc.nextInt(); 32 | int x,y; 33 | switch(choice) 34 | { 35 | case 1: 36 | { 37 | System.out.println("enter two number"); 38 | x = sc.nextInt(); 39 | y = sc.nextInt(); 40 | System.out.println("result:"+c.add(x, y)); 41 | } 42 | case 2: 43 | { 44 | System.out.println("enter two number"); 45 | x = sc.nextInt(); 46 | y = sc.nextInt(); 47 | System.out.println("result:"+c.sub(x, y)); 48 | } 49 | case 3: 50 | { 51 | System.out.println("enter two number"); 52 | x = sc.nextInt(); 53 | y = sc.nextInt(); 54 | System.out.println("result:"+c.mul(x, y)); 55 | } 56 | case 4: 57 | { 58 | System.out.println("enter two number"); 59 | x = sc.nextInt(); 60 | y = sc.nextInt(); 61 | System.out.println("result:"+c.div(x, y)); 62 | } 63 | } 64 | } 65 | catch(Exception e) 66 | { 67 | System.out.println(e); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /calculator/src/calculator/calculatorinterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | 8 | import java.rmi.Remote; 9 | import java.rmi.RemoteException; 10 | 11 | /** 12 | * 13 | * @author prasad 14 | */ 15 | public interface calculatorinterface extends Remote{ 16 | public int add(int x,int y) throws RemoteException; 17 | public int sub(int x,int y) throws RemoteException; 18 | public int mul(int x,int y) throws RemoteException; 19 | public int div(int x,int y) throws RemoteException; 20 | } 21 | -------------------------------------------------------------------------------- /calculator/src/calculator/calculatorserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | 8 | import java.rmi.RemoteException; 9 | import java.rmi.registry.LocateRegistry; 10 | import java.rmi.registry.Registry; 11 | import java.rmi.NotBoundException; 12 | /** 13 | * 14 | * @author prasad 15 | */ 16 | public class calculatorserver { 17 | public static void main(String[] args) throws RemoteException,NotBoundException 18 | { 19 | try 20 | { 21 | Registry r = java.rmi.registry.LocateRegistry.createRegistry(1090); 22 | r.rebind("Calculator", new Calculator()); 23 | System.out.println("server is running"); 24 | } 25 | catch(Exception e) 26 | { 27 | System.out.println(e); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ejbcalc/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project ejbcalc. 12 | 13 | 61 | 62 | -------------------------------------------------------------------------------- /ejbcalc/build/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /ejbcalc/build/ejbcalc-ejb.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/build/ejbcalc-ejb.jar -------------------------------------------------------------------------------- /ejbcalc/build/ejbcalc-war.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/build/ejbcalc-war.war -------------------------------------------------------------------------------- /ejbcalc/build/gfv3ee6.dpf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/build/gfv3ee6.dpf -------------------------------------------------------------------------------- /ejbcalc/dist/ejbcalc.ear: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/dist/ejbcalc.ear -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-ejb_jar/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-ejb_jar/.netbeans_automatic_build -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-ejb_jar/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-ejb_jar/.netbeans_update_resources -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-ejb_jar/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Ant-Version: Apache Ant 1.9.7 3 | Created-By: 1.8.0_131-b11 (Oracle Corporation) 4 | 5 | -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-ejb_jar/test/operation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-ejb_jar/test/operation.class -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Ant-Version: Apache Ant 1.9.7 3 | Created-By: 1.8.0_131-b11 (Oracle Corporation) 4 | 5 | -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/WEB-INF/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/WEB-INF/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/WEB-INF/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/WEB-INF/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/WEB-INF/classes/result.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/WEB-INF/classes/result.class -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | result 5 | result 6 | 7 | 8 | result 9 | /result 10 | 11 | 12 | 13 | 30 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ejbcalc/dist/gfdeploy/ejbcalc/ejbcalc-war_war/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Document : index 3 | Created on : 23 Apr, 2018, 12:47:18 PM 4 | Author : prasad 5 | --%> 6 | 7 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 8 | 9 | 10 | 11 | 12 | JSP Page 13 | 14 | 15 |

Hello World!

16 |
17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project ejbcalc-ejb. 12 | 13 | 68 | 69 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-ejb/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-ejb/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/build/classes/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Ant-Version: Apache Ant 1.9.7 3 | Created-By: 1.8.0_131-b11 (Oracle Corporation) 4 | 5 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/build/classes/test/operation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-ejb/build/classes/test/operation.class -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/dist/ejbcalc-ejb.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-ejb/dist/ejbcalc-ejb.jar -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/nbproject/ant-deploy.xml: -------------------------------------------------------------------------------- 1 | 2 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 141 | 142 | 143 | 144 | 145 | 146 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=2cb6c3e3 2 | build.xml.script.CRC32=ec40cc40 3 | build.xml.stylesheet.CRC32=5910fda3@1.56.1 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=2cb6c3e3 7 | nbproject/build-impl.xml.script.CRC32=167c9fb9 8 | nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.56.1 9 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | deploy.ant.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\config\\GlassFishEE6\\Properties\\gfv3-644297456.properties 2 | j2ee.platform.is.jsr109=true 3 | j2ee.server.domain=C:/Users/prasad/AppData/Roaming/NetBeans/8.2/config/GF_4.1.1/domain1 4 | j2ee.server.home=C:/Program Files/glassfish-4.1.1/glassfish 5 | j2ee.server.instance=[C:\\Program Files\\glassfish-4.1.1\\glassfish;C:\\Program Files\\glassfish-4.1.1\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848 6 | j2ee.server.middleware=C:/Program Files/glassfish-4.1.1 7 | netbeans.user=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2 8 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/prasad/Documents/NetBeansProjects/ejbcalc/ejbcalc-ejb/src/java/test/operation.java 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=true 3 | annotation.processing.processors.list= 4 | annotation.processing.run.all.processors=true 5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 6 | build.classes.dir=${build.dir}/classes 7 | build.classes.excludes=**/*.java,**/*.form,**/.nbattrs 8 | build.dir=build 9 | build.ear.classes.dir=${build.dir}/classes 10 | build.generated.dir=${build.dir}/generated 11 | build.generated.sources.dir=${build.dir}/generated-sources 12 | build.test.classes.dir=${build.dir}/test/classes 13 | build.test.results.dir=${build.dir}/test/results 14 | debug.classpath=${javac.classpath}:${build.classes.dir} 15 | debug.test.classpath=\ 16 | ${run.test.classpath} 17 | dist.dir=dist 18 | dist.ear.jar=${dist.dir}/${jar.name} 19 | dist.jar=${dist.dir}/${jar.name} 20 | dist.javadoc.dir=${dist.dir}/javadoc 21 | endorsed.classpath=\ 22 | ${libs.javaee-endorsed-api-7.0.classpath} 23 | excludes= 24 | includes=** 25 | j2ee.compile.on.save=true 26 | j2ee.deploy.on.save=true 27 | j2ee.platform=1.7 28 | j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar 29 | j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar 30 | j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar 31 | j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar 32 | j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar 33 | j2ee.platform.wsit.classpath= 34 | j2ee.server.type=gfv3ee6 35 | jar.compress=false 36 | jar.name=ejbcalc-ejb.jar 37 | javac.classpath= 38 | javac.debug=true 39 | javac.deprecation=false 40 | javac.processorpath=${javac.classpath} 41 | javac.source=1.8 42 | javac.target=1.8 43 | javac.test.classpath=\ 44 | ${javac.classpath}:\ 45 | ${build.classes.dir} 46 | javac.test.processorpath=${javac.test.classpath} 47 | javadoc.additionalparam= 48 | javadoc.author=false 49 | javadoc.encoding=${source.encoding} 50 | javadoc.noindex=false 51 | javadoc.nonavbar=false 52 | javadoc.notree=false 53 | javadoc.preview=true 54 | javadoc.private=false 55 | javadoc.splitindex=true 56 | javadoc.use=true 57 | javadoc.version=false 58 | javadoc.windowtitle= 59 | meta.inf=${source.root}/conf 60 | meta.inf.excludes=sun-cmp-mappings.xml 61 | platform.active=default_platform 62 | resource.dir=setup 63 | run.test.classpath=\ 64 | ${javac.test.classpath}:\ 65 | ${build.test.classes.dir} 66 | # Space-separated list of JVM arguments used when running a class with a main method or a unit test 67 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): 68 | runmain.jvmargs= 69 | source.encoding=UTF-8 70 | source.root=src 71 | src.dir=${source.root}/java 72 | test.src.dir=test 73 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.j2ee.ejbjarproject 4 | 5 | 6 | ejbcalc-ejb 7 | 1.6.5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ..\.\lib\nblibraries.properties 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/src/conf/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-ejb/src/java/test/operation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package test; 7 | 8 | import javax.ejb.Stateless; 9 | import javax.ejb.LocalBean; 10 | 11 | /** 12 | * 13 | * @author prasad 14 | */ 15 | @Stateless 16 | @LocalBean 17 | public class operation { 18 | 19 | // Add business logic below. (Right-click in editor and choose 20 | // "Insert Code > Add Business Method") 21 | public int add(int x, int y) { 22 | return x+y; 23 | } 24 | public int sub(int x, int y) { 25 | return x-y; 26 | } 27 | public int mul(int x, int y) { 28 | return x*y; 29 | } 30 | public int div(int x, int y) { 31 | return x/y; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project ejbcalc-war. 12 | 13 | 71 | 72 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/build/web/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Ant-Version: Apache Ant 1.9.7 3 | Created-By: 1.8.0_131-b11 (Oracle Corporation) 4 | 5 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/build/web/WEB-INF/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-war/build/web/WEB-INF/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/build/web/WEB-INF/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-war/build/web/WEB-INF/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/build/web/WEB-INF/classes/result.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-war/build/web/WEB-INF/classes/result.class -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/build/web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | result 5 | result 6 | 7 | 8 | result 9 | /result 10 | 11 | 12 | 13 | 30 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/build/web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Document : index 3 | Created on : 23 Apr, 2018, 12:47:18 PM 4 | Author : prasad 5 | --%> 6 | 7 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 8 | 9 | 10 | 11 | 12 | JSP Page 13 | 14 | 15 |

Hello World!

16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/dist/ejbcalc-war.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/ejbcalc-war/dist/ejbcalc-war.war -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/nbproject/ant-deploy.xml: -------------------------------------------------------------------------------- 1 | 2 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 141 | 142 | 143 | 144 | 145 | 146 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=68ddc230 2 | build.xml.script.CRC32=649b9d9b 3 | build.xml.stylesheet.CRC32=651128d4@1.77.1.1 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=68ddc230 7 | nbproject/build-impl.xml.script.CRC32=850705b4 8 | nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1 9 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | deploy.ant.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\config\\GlassFishEE6\\Properties\\gfv3-644297456.properties 2 | j2ee.platform.is.jsr109=true 3 | j2ee.server.domain=C:/Users/prasad/AppData/Roaming/NetBeans/8.2/config/GF_4.1.1/domain1 4 | j2ee.server.home=C:/Program Files/glassfish-4.1.1/glassfish 5 | j2ee.server.instance=[C:\\Program Files\\glassfish-4.1.1\\glassfish;C:\\Program Files\\glassfish-4.1.1\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848 6 | j2ee.server.middleware=C:/Program Files/glassfish-4.1.1 7 | user.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 8 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/prasad/Documents/NetBeansProjects/ejbcalc/ejbcalc-war/web/index.jsp 7 | file:/C:/Users/prasad/Documents/NetBeansProjects/ejbcalc/ejbcalc-war/src/java/result.java 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=true 3 | annotation.processing.processors.list= 4 | annotation.processing.run.all.processors=true 5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 6 | build.classes.dir=${build.web.dir}/WEB-INF/classes 7 | build.classes.excludes=**/*.java,**/*.form 8 | build.dir=build 9 | build.generated.dir=${build.dir}/generated 10 | build.generated.sources.dir=${build.dir}/generated-sources 11 | build.test.classes.dir=${build.dir}/test/classes 12 | build.test.results.dir=${build.dir}/test/results 13 | build.web.dir=${build.dir}/web 14 | build.web.excludes=${build.classes.excludes} 15 | client.urlPart= 16 | compile.jsps=false 17 | conf.dir=${source.root}/conf 18 | debug.classpath=${build.classes.dir}:${javac.classpath} 19 | debug.test.classpath=\ 20 | ${run.test.classpath} 21 | display.browser=true 22 | # Files to be excluded from distribution war 23 | dist.archive.excludes= 24 | dist.dir=dist 25 | dist.ear.war=${dist.dir}/${war.ear.name} 26 | dist.javadoc.dir=${dist.dir}/javadoc 27 | dist.war=${dist.dir}/${war.name} 28 | endorsed.classpath=\ 29 | ${libs.javaee-endorsed-api-7.0.classpath} 30 | excludes= 31 | includes=** 32 | j2ee.compile.on.save=true 33 | j2ee.copy.static.files.on.save=true 34 | j2ee.deploy.on.save=true 35 | j2ee.platform=1.7 36 | j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar 37 | j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar 38 | j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar 39 | j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar 40 | j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar 41 | j2ee.platform.wsit.classpath= 42 | j2ee.server.type=gfv3ee6 43 | jar.compress=false 44 | javac.classpath=\ 45 | ${reference.ejbcalc-ejb.dist} 46 | # Space-separated list of extra javac options 47 | javac.compilerargs= 48 | javac.debug=true 49 | javac.deprecation=false 50 | javac.processorpath=\ 51 | ${javac.classpath} 52 | javac.source=1.8 53 | javac.target=1.8 54 | javac.test.classpath=\ 55 | ${javac.classpath}:\ 56 | ${build.classes.dir} 57 | javac.test.processorpath=\ 58 | ${javac.test.classpath} 59 | javadoc.additionalparam= 60 | javadoc.author=false 61 | javadoc.encoding=${source.encoding} 62 | javadoc.noindex=false 63 | javadoc.nonavbar=false 64 | javadoc.notree=false 65 | javadoc.preview=true 66 | javadoc.private=false 67 | javadoc.splitindex=true 68 | javadoc.use=true 69 | javadoc.version=false 70 | javadoc.windowtitle= 71 | lib.dir=${web.docbase.dir}/WEB-INF/lib 72 | no.dependencies=false 73 | persistence.xml.dir=${conf.dir} 74 | platform.active=default_platform 75 | project.ejbcalc-ejb=../ejbcalc-ejb 76 | reference.ejbcalc-ejb.dist=${project.ejbcalc-ejb}/dist/ejbcalc-ejb.jar 77 | resource.dir=setup 78 | run.test.classpath=\ 79 | ${javac.test.classpath}:\ 80 | ${build.test.classes.dir} 81 | # Space-separated list of JVM arguments used when running a class with a main method or a unit test 82 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): 83 | runmain.jvmargs= 84 | source.encoding=UTF-8 85 | source.root=src 86 | src.dir=${source.root}/java 87 | test.src.dir=test 88 | war.content.additional= 89 | war.ear.name=${war.name} 90 | war.name=ejbcalc-war.war 91 | web.docbase.dir=web 92 | webinf.dir=web/WEB-INF 93 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.web.project 4 | 5 | 6 | ejbcalc-war 7 | 1.6.5 8 | 9 | 10 | ${reference.ejbcalc-ejb.dist} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ..\.\lib\nblibraries.properties 23 | 24 | 25 | 26 | ejbcalc-ejb 27 | jar 28 | 29 | dist 30 | clean 31 | dist 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/src/conf/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/src/java/result.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | import java.io.IOException; 8 | import java.io.PrintWriter; 9 | import javax.ejb.EJB; 10 | import javax.servlet.ServletException; 11 | import javax.servlet.http.HttpServlet; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | 15 | /** 16 | * 17 | * @author prasad 18 | */ 19 | public class result extends HttpServlet { 20 | 21 | @EJB 22 | private test.operation operation; 23 | 24 | 25 | 26 | /** 27 | * Processes requests for both HTTP GET and POST 28 | * methods. 29 | * 30 | * @param request servlet request 31 | * @param response servlet response 32 | * @throws ServletException if a servlet-specific error occurs 33 | * @throws IOException if an I/O error occurs 34 | */ 35 | protected void processRequest(HttpServletRequest request, HttpServletResponse response) 36 | throws ServletException, IOException { 37 | response.setContentType("text/html;charset=UTF-8"); 38 | try (PrintWriter out = response.getWriter()) { 39 | int x =Integer.parseInt(request.getParameter("x")); 40 | int y = Integer.parseInt(request.getParameter("y")); 41 | /* TODO output your page here. You may use following sample code. */ 42 | out.println(""); 43 | out.println(""); 44 | out.println(""); 45 | out.println("Servlet result"); 46 | out.println(""); 47 | out.println(""); 48 | out.println("addition of two numbers."+operation.add(x,y)); 49 | out.println("
"); 50 | out.println("substraction of two number."+operation.sub(x,y)); 51 | out.println("
"); 52 | out.println("multiplication of two numbers."+operation.mul(x,y)); 53 | out.println("
"); 54 | out.println("division of teo numbers."+operation.div(x,y)); 55 | 56 | out.println("

Servlet result at " + request.getContextPath() + "

"); 57 | out.println(""); 58 | out.println(""); 59 | } 60 | } 61 | 62 | // 63 | /** 64 | * Handles the HTTP GET method. 65 | * 66 | * @param request servlet request 67 | * @param response servlet response 68 | * @throws ServletException if a servlet-specific error occurs 69 | * @throws IOException if an I/O error occurs 70 | */ 71 | @Override 72 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 73 | throws ServletException, IOException { 74 | processRequest(request, response); 75 | } 76 | 77 | /** 78 | * Handles the HTTP POST method. 79 | * 80 | * @param request servlet request 81 | * @param response servlet response 82 | * @throws ServletException if a servlet-specific error occurs 83 | * @throws IOException if an I/O error occurs 84 | */ 85 | @Override 86 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 87 | throws ServletException, IOException { 88 | processRequest(request, response); 89 | } 90 | 91 | /** 92 | * Returns a short description of the servlet. 93 | * 94 | * @return a String containing servlet description 95 | */ 96 | @Override 97 | public String getServletInfo() { 98 | return "Short description"; 99 | }// 100 | 101 | } 102 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | result 5 | result 6 | 7 | 8 | result 9 | /result 10 | 11 | 12 | 13 | 30 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ejbcalc/ejbcalc-war/web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Document : index 3 | Created on : 23 Apr, 2018, 12:47:18 PM 4 | Author : prasad 5 | --%> 6 | 7 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 8 | 9 | 10 | 11 | 12 | JSP Page 13 | 14 | 15 |

Hello World!

16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ejbcalc/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -------------------------------------------------------------------------------- /ejbcalc/lib/javaee-endorsed-api-7.0/javaee-doc-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/lib/javaee-endorsed-api-7.0/javaee-doc-api.jar -------------------------------------------------------------------------------- /ejbcalc/lib/javaee-endorsed-api-7.0/javax.annotation-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/lib/javaee-endorsed-api-7.0/javax.annotation-api.jar -------------------------------------------------------------------------------- /ejbcalc/lib/javaee-endorsed-api-7.0/javax.xml.soap-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/lib/javaee-endorsed-api-7.0/javax.xml.soap-api.jar -------------------------------------------------------------------------------- /ejbcalc/lib/javaee-endorsed-api-7.0/jaxb-api-osgi.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/lib/javaee-endorsed-api-7.0/jaxb-api-osgi.jar -------------------------------------------------------------------------------- /ejbcalc/lib/javaee-endorsed-api-7.0/jaxws-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/lib/javaee-endorsed-api-7.0/jaxws-api.jar -------------------------------------------------------------------------------- /ejbcalc/lib/javaee-endorsed-api-7.0/jsr181-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/ejbcalc/lib/javaee-endorsed-api-7.0/jsr181-api.jar -------------------------------------------------------------------------------- /ejbcalc/lib/nblibraries.properties: -------------------------------------------------------------------------------- 1 | libs.CopyLibs.classpath=\ 2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar 3 | libs.CopyLibs.displayName=CopyLibs Task 4 | libs.CopyLibs.prop-version=2.0 5 | libs.javaee-endorsed-api-7.0.classpath=\ 6 | ${base}/javaee-endorsed-api-7.0/javax.annotation-api.jar;\ 7 | ${base}/javaee-endorsed-api-7.0/javax.xml.soap-api.jar;\ 8 | ${base}/javaee-endorsed-api-7.0/jaxb-api-osgi.jar;\ 9 | ${base}/javaee-endorsed-api-7.0/jaxws-api.jar;\ 10 | ${base}/javaee-endorsed-api-7.0/jsr181-api.jar 11 | libs.javaee-endorsed-api-7.0.displayName=Java EE 7 Endorsed API Library 12 | libs.javaee-endorsed-api-7.0.javadoc=\ 13 | ${base}/javaee-endorsed-api-7.0/javaee-doc-api.jar 14 | -------------------------------------------------------------------------------- /ejbcalc/nbproject/ant-deploy.xml: -------------------------------------------------------------------------------- 1 | 2 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 141 | 142 | 143 | 144 | 145 | 146 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /ejbcalc/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | Must set build.dir 175 | Must set build.generated.dir 176 | Must set dist.dir 177 | Must set build.classes.excludes 178 | Must set dist.jar 179 | 180 | 181 | 182 | The libs.CopyLibs.classpath property is not set up. 183 | This property must point to 184 | org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part 185 | of NetBeans IDE installation and is usually located at 186 | <netbeans_installation>/java<version>/ant/extra folder. 187 | Either open the project in the IDE and make sure CopyLibs library 188 | exists or setup the property manually. For example like this: 189 | ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar 190 | 191 | 192 | 193 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | Must set JVM to use for profiling in profiler.info.jvm 207 | Must set profiler agent JVM arguments in profiler.info.jvmargs.agent 208 | 209 | 212 | 213 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 300 | 301 | 302 | 303 | 304 | 305 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. 417 | 418 | 419 | Launching ${browse.url} 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 597 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | -------------------------------------------------------------------------------- /ejbcalc/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=25e66b70 2 | build.xml.script.CRC32=d110560a 3 | build.xml.stylesheet.CRC32=a5d15b16@1.54.1 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=25e66b70 7 | nbproject/build-impl.xml.script.CRC32=d0800076 8 | nbproject/build-impl.xml.stylesheet.CRC32=5eea63a6@1.54.1 9 | -------------------------------------------------------------------------------- /ejbcalc/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | deploy.ant.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\config\\GlassFishEE6\\Properties\\gfv3-644297456.properties 2 | j2ee.appclient.tool.jvmoptions=-Djava.endorsed.dirs="C:\\Program Files\\glassfish-4.1.1\\glassfish\\lib\\endorsed";"C:\\Program Files\\glassfish-4.1.1\\glassfish\\modules\\endorsed" -javaagent:"C:\\Program Files\\glassfish-4.1.1\\glassfish\\lib\\gf-client.jar"=mode=acscript,arg=-configxml,arg="C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\config\\GF_4.1.1\\domain1\\config\\glassfish-acc.xml",client=jar= 3 | j2ee.appclient.tool.mainclass=org.glassfish.appclient.client.AppClientFacade 4 | j2ee.appclient.tool.runtime= 5 | j2ee.platform.is.jsr109=true 6 | j2ee.server.domain=C:/Users/prasad/AppData/Roaming/NetBeans/8.2/config/GF_4.1.1/domain1 7 | j2ee.server.home=C:/Program Files/glassfish-4.1.1/glassfish 8 | j2ee.server.instance=[C:\\Program Files\\glassfish-4.1.1\\glassfish;C:\\Program Files\\glassfish-4.1.1\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848 9 | j2ee.server.middleware=C:/Program Files/glassfish-4.1.1 10 | netbeans.user=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2 11 | wa.copy.client.jar.from=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\config\\GF_4.1.1\\domain1\\generated\\xml 12 | -------------------------------------------------------------------------------- /ejbcalc/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ejbcalc/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | build.classes.excludes=**/*.java,**/*.form,**/.nbattrs 2 | build.dir=build 3 | build.generated.dir=${build.dir}/generated 4 | client.module.uri=ejbcalc-war 5 | client.urlPart= 6 | debug.classpath=${javac.classpath}::${jar.content.additional}:${run.classpath} 7 | display.browser=true 8 | dist.dir=dist 9 | dist.jar=${dist.dir}/${jar.name} 10 | endorsed.classpath=\ 11 | ${libs.javaee-endorsed-api-7.0.classpath} 12 | j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args} 13 | j2ee.compile.on.save=true 14 | j2ee.deploy.on.save=true 15 | j2ee.platform=1.7 16 | j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar 17 | j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar 18 | j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar 19 | j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar 20 | j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar 21 | j2ee.platform.wsit.classpath= 22 | j2ee.server.type=gfv3ee6 23 | jar.compress=false 24 | jar.content.additional=\ 25 | ${reference.ejbcalc-war.dist-ear}:\ 26 | ${reference.ejbcalc-ejb.dist-ear} 27 | jar.name=ejbcalc.ear 28 | javac.debug=true 29 | javac.deprecation=false 30 | javac.source=1.8 31 | javac.target=1.8 32 | meta.inf=src/conf 33 | no.dependencies=false 34 | platform.active=default_platform 35 | project.ejbcalc-ejb=ejbcalc-ejb 36 | project.ejbcalc-war=ejbcalc-war 37 | reference.ejbcalc-ejb.dist-ear=${project.ejbcalc-ejb}/dist/ejbcalc-ejb.jar 38 | reference.ejbcalc-war.dist-ear=${project.ejbcalc-war}/dist/ejbcalc-war.war 39 | resource.dir=setup 40 | source.root=. 41 | -------------------------------------------------------------------------------- /ejbcalc/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.j2ee.earproject 4 | 5 | 6 | ejbcalc 7 | 1.6.5 8 | 9 | 10 | 11 | ${reference.ejbcalc-war.dist-ear} 12 | / 13 | 14 | 15 | ${reference.ejbcalc-ejb.dist-ear} 16 | / 17 | 18 | 19 | 20 | 21 | .\lib\nblibraries.properties 22 | 23 | 24 | 25 | ejbcalc-ejb 26 | j2ee_ear_archive 27 | 28 | dist-ear 29 | clean-ear 30 | dist-ear 31 | 32 | 33 | ejbcalc-war 34 | j2ee_ear_archive 35 | 36 | dist-ear 37 | clean-ear 38 | dist-ear 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ejbcalc/src/conf/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /rmilogin/calculator/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project calculator. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /rmilogin/calculator/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/rmilogin/calculator/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /rmilogin/calculator/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/rmilogin/calculator/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /rmilogin/calculator/build/classes/calculator/Calculator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/rmilogin/calculator/build/classes/calculator/Calculator.class -------------------------------------------------------------------------------- /rmilogin/calculator/build/classes/calculator/calculatorclient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/rmilogin/calculator/build/classes/calculator/calculatorclient.class -------------------------------------------------------------------------------- /rmilogin/calculator/build/classes/calculator/calculatorinterface.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/rmilogin/calculator/build/classes/calculator/calculatorinterface.class -------------------------------------------------------------------------------- /rmilogin/calculator/build/classes/calculator/calculatorserver.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/rmilogin/calculator/build/classes/calculator/calculatorserver.class -------------------------------------------------------------------------------- /rmilogin/calculator/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prasadgujar/DistributedSystem/b59b9e0bf050d5fd77f3cdf33652646d9fadf24b/rmilogin/calculator/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -------------------------------------------------------------------------------- /rmilogin/calculator/lib/nblibraries.properties: -------------------------------------------------------------------------------- 1 | libs.CopyLibs.classpath=\ 2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar 3 | libs.CopyLibs.displayName=CopyLibs Task 4 | libs.CopyLibs.prop-version=2.0 5 | -------------------------------------------------------------------------------- /rmilogin/calculator/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /rmilogin/calculator/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=86638026 2 | build.xml.script.CRC32=7618ae60 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=86638026 7 | nbproject/build-impl.xml.script.CRC32=ce151cdc 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /rmilogin/calculator/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\prasad\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 3 | -------------------------------------------------------------------------------- /rmilogin/calculator/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/prasad/Documents/NetBeansProjects/rmilogin/calculator/src/calculator/calculatorclient.java 7 | file:/C:/Users/prasad/Documents/NetBeansProjects/rmilogin/calculator/src/calculator/calculatorinterface.java 8 | file:/C:/Users/prasad/Documents/NetBeansProjects/rmilogin/calculator/src/calculator/Calculator.java 9 | file:/C:/Users/prasad/Documents/NetBeansProjects/rmilogin/calculator/src/calculator/calculatorserver.java 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /rmilogin/calculator/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/calculator.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | includes=** 31 | jar.compress=false 32 | javac.classpath= 33 | # Space-separated list of extra javac options 34 | javac.compilerargs= 35 | javac.deprecation=false 36 | javac.external.vm=true 37 | javac.processorpath=\ 38 | ${javac.classpath} 39 | javac.source=1.8 40 | javac.target=1.8 41 | javac.test.classpath=\ 42 | ${javac.classpath}:\ 43 | ${build.classes.dir} 44 | javac.test.processorpath=\ 45 | ${javac.test.classpath} 46 | javadoc.additionalparam= 47 | javadoc.author=false 48 | javadoc.encoding=${source.encoding} 49 | javadoc.noindex=false 50 | javadoc.nonavbar=false 51 | javadoc.notree=false 52 | javadoc.private=false 53 | javadoc.splitindex=true 54 | javadoc.use=true 55 | javadoc.version=false 56 | javadoc.windowtitle= 57 | main.class=calculator.Calculator 58 | manifest.file=manifest.mf 59 | meta.inf.dir=${src.dir}/META-INF 60 | mkdist.disabled=false 61 | platform.active=default_platform 62 | run.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | # Space-separated list of JVM arguments used when running the project. 66 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 67 | # To set system properties for unit tests define test-sys-prop.name=value: 68 | run.jvmargs= 69 | run.test.classpath=\ 70 | ${javac.test.classpath}:\ 71 | ${build.test.classes.dir} 72 | source.encoding=UTF-8 73 | src.dir=src 74 | test.src.dir=test 75 | -------------------------------------------------------------------------------- /rmilogin/calculator/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | calculator 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | .\lib\nblibraries.properties 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /rmilogin/calculator/src/calculator/Calculator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | import java.rmi.RemoteException; 8 | import java.rmi.*; 9 | import java.rmi.server.UnicastRemoteObject; 10 | /** 11 | * 12 | * @author prasad 13 | */ 14 | public class Calculator extends UnicastRemoteObject implements calculatorinterface{ 15 | 16 | public Calculator() throws RemoteException 17 | { 18 | String a,b; 19 | } 20 | public String check (String a, String b) throws RemoteException 21 | { 22 | if(!a.equals(b)) 23 | { 24 | return "valid user"; 25 | } 26 | else 27 | { 28 | return "invalid user"; 29 | } 30 | } 31 | 32 | /** 33 | * @param args the command line arguments 34 | */ 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /rmilogin/calculator/src/calculator/calculatorclient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | 8 | import java.net.MalformedURLException; 9 | import java.rmi.Naming; 10 | import java.rmi.NotBoundException; 11 | import java.rmi.RemoteException; 12 | import java.util.Scanner; 13 | 14 | /** 15 | * 16 | * @author prasad 17 | */ 18 | public class calculatorclient { 19 | public static void main(String[] args) throws NotBoundException,RemoteException, MalformedURLException { 20 | // TODO code application logic here 21 | Scanner sc = new Scanner(System.in); 22 | try 23 | { 24 | calculatorinterface c = (calculatorinterface) Naming.lookup("//localhost:1090/Calculator"); 25 | System.out.println("client is connected to server"); 26 | System.out.println("Please Enter Userid And Password"); 27 | 28 | String x = sc.nextLine(); 29 | String y = sc.nextLine(); 30 | System.out.println(c.check(x, y)); 31 | 32 | } 33 | catch(Exception e) 34 | { 35 | System.out.println(e); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /rmilogin/calculator/src/calculator/calculatorinterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | 8 | import java.rmi.Remote; 9 | import java.rmi.RemoteException; 10 | 11 | /** 12 | * 13 | * @author prasad 14 | */ 15 | public interface calculatorinterface extends Remote{ 16 | public String check(String x,String b) throws RemoteException; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /rmilogin/calculator/src/calculator/calculatorserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package calculator; 7 | 8 | import java.rmi.RemoteException; 9 | import java.rmi.registry.LocateRegistry; 10 | import java.rmi.registry.Registry; 11 | import java.rmi.NotBoundException; 12 | /** 13 | * 14 | * @author prasad 15 | */ 16 | public class calculatorserver { 17 | public static void main(String[] args) throws RemoteException,NotBoundException 18 | { 19 | try 20 | { 21 | Registry r = java.rmi.registry.LocateRegistry.createRegistry(1090); 22 | r.rebind("Calculator", new Calculator()); 23 | System.out.println("server is running"); 24 | } 25 | catch(Exception e) 26 | { 27 | System.out.println(e); 28 | } 29 | } 30 | } 31 | --------------------------------------------------------------------------------