• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

jsr 88: How to get an instance of DeployableObject

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I have an ear file which I want to deploy into weblogic. For that, I need to create a javax.enterprise.deploy.model.DeployableObject using jsr 88. But DeployableObject is an interface, so, how to get the instance of DeployableObject for my .ear file?

Thanks,
Guru
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guru:

It is not clear from your query as to what you are tryng to accomplish. To just deploy an ear file, you do not need to do anything w.r.t. JSR 88, or the DeployableObject interface. Just follow the standard weblogic documentation.

On the other hand, if you are developing a plugin for some JSR 88 compliant IDE to deploy ears to weblogic, that is a different matter. The following URL might of help in that case.
http://platform.netbeans.org/tutorials/nbm-server-plugin.html
 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sanjeev.

Already I have used weblogic API to deploy my ear file, it was successful.

Now, I have a typical problem like I would like create a single program through which I want to deploy ear file on different app servers (say weblogic, websphere, oas etc.).

So, I would like to use pure jsr 88 API (from sun java), so that it would be a common API and only class differs is that app server specific classes for registering the implementation factory.

I am able to get the DeploymentManager instance using jsr 88 APIs. Now, next step is getting the DeployableObject for the given ear file, as far as I have searched there is no implementation class for this interface or any classes seem to give the instance of DeployableObject. But, I have seen WebLogicDeployableObject implements DeployableObject, but it would be narrow to weblogic. If I use this class, then for other app servers, I need to have app server specific DeployableObject, isn't it? So, looking for pure jsr 88 api for this.

Thanks,
Guru
 
Sanjeev Verma
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Already I have used weblogic API to deploy my ear file, it was successful.

Now, I have a typical problem like I would like create a single program through which I want to deploy ear file on different app servers (say weblogic, websphere, oas etc.).

So, I would like to use pure jsr 88 API (from sun java), so that it would be a common API and only class differs is that app server specific classes for registering the implementation factory.



Again, unless you have a very specific reason for doing it the way you are planning to, i.e., via the JSR 88 way, I would not advise this approach. I would rather prefer using ANT build scripts for doing this. Most app servers today provide integration with ANT for deployment purposes, and that is the easiest interface to use.


I am able to get the DeploymentManager instance using jsr 88 APIs. Now, next step is getting the DeployableObject for the given ear file, as far as I have searched there is no implementation class for this interface or any classes seem to give the instance of DeployableObject. But, I have seen WebLogicDeployableObject implements DeployableObject, but it would be narrow to weblogic. If I use this class, then for other app servers, I need to have app server specific DeployableObject, isn't it? So, looking for pure jsr 88 api for this.



I do not know much about JSR 88, but I will chance a guess here. In all likelyhood, *JSR 88 compliant* app servers need to provide an implementation of the DeployableObject interface, which JSR 88 compliant IDE's can then access in a vendor nuetral way to deploy ears, like in the case of what you experienced for weblogic. Does that make sense?

I know the person who was involved in this JSR. I will try and get her to comment on this as well.
 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sanjeev,

By the way, do you what URI we should give for OAS (ORACLE OC4J) and websphere, since I am working simultaneously on them too?

Thanks,
Guru
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gurumurthy Ramamurthy:
Thanks Sanjeev.

Already I have used weblogic API to deploy my ear file, it was successful.

Now, I have a typical problem like I would like create a single program through which I want to deploy ear file on different app servers (say weblogic, websphere, oas etc.).

So, I would like to use pure jsr 88 API (from sun java), so that it would be a common API and only class differs is that app server specific classes for registering the implementation factory.

I am able to get the DeploymentManager instance using jsr 88 APIs. Now, next step is getting the DeployableObject for the given ear file, as far as I have searched there is no implementation class for this interface or any classes seem to give the instance of DeployableObject. But, I have seen WebLogicDeployableObject implements DeployableObject, but it would be narrow to weblogic. If I use this class, then for other app servers, I need to have app server specific DeployableObject, isn't it? So, looking for pure jsr 88 api for this.

Thanks,
Guru






Gurumurthy,

Let me explain a bit about JSR-88. There are a set of APIs
the App Server vendor must implement and a set of APIs the
external Tool vendor must supply. The App Server vendor
must implement all the APIs in the javax/enterprise/deploy/spi
package because those APIs represents a direct connention into
the appserver and that is usually proprietatary code. The Tool
vendor must implement all the APIs in the javax/enterprise/deploy/module
package because they have control of the access to the app code.
The tool vendor may be using a proprietary directory structure for
and unjar-ed app or the app may be in a stnd J2EE archive.

In this case you are the Tool vendor. You must implement the
javax/enterprise/deploy/module package interfaces, and DeployableObject
is one of them, however you need not create code from scratch. There
are several open-src projects have have implemented these APIs. I
would recommend taking what they have and modifying it to meet
your needs. Glassfish and Netbeans have implementations.
See http://java.sun.com/javaee/glassfish/ and http://netbeans.org

Join the glassfish project (for free) and you have access to all
the src code. The package name to the implementation is
..../deployment-api/src/java/javax/enterprise/deploy/model/J2eeApplicationObject.java

Netbeans has src code download modules.
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic