[Microcontainer] - Re: SchemaResolverDeployer is parsing but not deploying
by david.lloyd@jboss.com
"alesj" wrote : "david.lloyd(a)jboss.com" wrote :
| | If not, isn't this a step that would have to be duplicated for every project that has a customized XML deployment format?
| |
| | Or, are you suggesting that I should use the MC's root deployment element instead?
| Yes, then you don't need that extra deployer.
| But if you still want to have your custom xml with your custom root, then there is no other way - at least not out-of-the-box.
OK, well I thought about this some more, and I still don't like this option because the integration with the MC descriptor doesn't work the way that I think would make sense.
To illustrate what I mean, say the user wants to define a TCP server. The XML snippet would look like this:
| ...
| <io:tcp-server name="MyServer" handler-factory-bean="MyHandlerFactory">
| <io:bind-address port="12345"/>
| </io:tcp-server>
| ...
|
This basically expands to a BeanMetaData that describes a bean named "MyServer". So a "tcp-server" is basically just a way to define a specific kind of bean - so from the user's perspective, they might expect that a "tcp-server" could be used anywhere a "bean" might be used, since "tcp-server" just describes a bean. If I use the BeanMetaDataFactory method though, it's not a 1:1 mapping like that.
Make any sense? I mean I guess it might be handy to be able to have the bean deployments and I/O deployments in one file, so you can define your handler beans and then in the same file deploy the servers that use it. On the other hand, I don't want to force the users to do that.
The problem I continue to have is that those of us trying to make deployers using the new stuff are basically pioneering new territory, and since there are no established idioms we're really just making it up as we go.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152519#4152519
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152519
17 years, 11 months
[Microcontainer] - Re: SchemaResolverDeployer is parsing but not deploying
by alesj
I'll answer it anyway since reference guide doesn't say much. ;-)
"david.lloyd(a)jboss.com" wrote : BTW, what does KernelDeploymentDeployer actually *do*?
|
In new Deployers there is a notion of component.
As I see components, they are the atoms of what you pass around in deployer's attachments - cannot be split any further.
And those are the items that represent the actual runtime components, e.g. BeanMetaData ~ bean, ServiceMetaData ~ MBean, ...
e.g. if admin console needs to inspect its runtime environment, all it needs to do is look at the deployer's/deployment unit's components.
So, in order to have components, something needs to create them.
Usually splitting some group of components from plain deployment unit into component deployment units.
And that's what KDD does. It takes KD and splits it into BMDs. Or takes BMD from plain deployment unit and puts it into component du - so that it really is a component.
It's more of a conceptual thing, keeping things clean and prepared for things that follow - profile service, etc.
OK, this is how I see it. :-)
I just had a discussion with MarkN about it, and we don't completely agree on everything.
Adrian might explain it better, and I hope I didn't do a shot in the dark (too much). :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152512#4152512
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152512
17 years, 11 months
[JBoss Portal] - 2columns layout list unsorted
by esmith1
After adding a 2columns layout (details below), I see in the Configure Dashboard the layouts are not sorted and display in this order: generic, 1column, 3columns, 2columns, default. (Notice 2 follows 3.) This seems random: not alphabetical and does not match the order in the portal-layouts.xml.
As best I can tell this will require a java code change to sort (by layout name?), unless someone knows another way to sort the layout list?
dashboard.xhtml is using #{applicationScope.LayoutService.layoutItems}
which is coming from AdminPropertyResolver.java using Collection layouts = layoutService.getLayouts();
which is coming from LayoutServiceImpl.java which is using return Collections.unmodifiableCollection(layouts.values());.
Here's how to create the 2columns layout:
1) Create a new directory, jboss-portal.sar\portal-core.war\layouts\2columns
2) Copy jboss-portal.sar\portal-core.war\layouts\generic\index.jsp to
jboss-portal.sar\portal-core.war\layouts\2columns\index.jsp
3) Replace this block of code in the new 2columns\index.jsp file
| <div id="content-container">
| <!-- insert the content of the 'left' region of the page, and assign the css selector id 'regionA' -->
| <p:region regionName='left' regionID='regionA'/>
| <!-- insert the content of the 'center' region of the page, and assign the css selector id 'regionB' -->
| <p:region regionName='center' regionID='regionB'/>
| <hr class="cleaner"/>
| </div>
|
with this
| <div id="content-container">
| <!-- insert the content of the 'left' region of the page, and assign the css selector id 'region50Percent' -->
| <p:region regionName='left' regionID='region50Percent'/>
| <!-- insert the content of the 'right' region of the page, and assign the css selector id 'region50Percent' -->
| <p:region regionName='right' regionID='region50Percent'/>
| <hr class="cleaner"/>
| </div>
|
4) Insert this block of code into jboss-portal.sar\portal-core.war\WEB-INF\portal-layouts.xml between 1column and 3columns
| <layout>
| <name>2columns</name>
| <uri>/layouts/2columns/index.jsp</uri>
| <uri state="maximized">/layouts/generic/maximized.jsp</uri>
| <regions>
| <region name="left"/>
| <region name="right"/>
| </regions>
| </layout>
|
5) For each theme you want to have support this, for instance renaissance, add these lines to
jboss-portal.sar\portal-core.war\themes\renaissance\portal_style.css, below the #regionC definition:
| #region50Percent {
| width: 50%;
| float: left;
| margin: 0px;
| padding: 0px;
| min-width: 250px;
| }
|
6) Restart the server. You should see the "2columns" in the Dashboard layout select list.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152509#4152509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152509
17 years, 11 months